Package homePlatform App BuilderStudy guide
Study guide

Chapter 118% of the exam55 min

Salesforce Fundamentals

Where declarative customization ends and code begins, when to extend an org from AgentExchange instead of building, how profiles, permission sets, field-level security and record types control object and field access, how org-wide defaults, the role hierarchy and sharing rules control record access, and what reports, report types and dashboards can do.

By the end of this chapter you can

  • Identify the boundaries of declarative customization and the use cases for programmatic customization
  • Identify common scenarios for extending an org with AgentExchange
  • Apply features that restrict and extend object, record and field access
  • Determine the appropriate sharing solution for a set of business requirements
  • Identify the features of reports, report types and dashboards

Declarative and programmatic customization

Scenario: A recruiting team wants a custom app to track open positions, candidates and interviews. Most of it can be built with clicks; a few requirements might need code.

Salesforce can be customized in two ways:

Declarative customization comes first: objects, fields and relationships; formulas and validation rules; roll-up summaries and Flow; Lightning App Builder and layouts; quick actions and AgentExchange apps. Programmatic customization is used when needed: Apex triggers and classes, Lightning Web Components, complex logic or integrations, very large data volumes, or a user interface that no component provides. Declarative (clicks) first Objects, fields, relationships Formulas, validation rules Roll-up summaries, Flow Lightning App Builder, layouts Quick actions, AgentExchange apps Programmatic (code) when needed Apex triggers and classes Lightning Web Components Complex logic or integrations Very large data volumes UI that no component provides
Declarative tools first; code only where they stop

Declarative (clicks) Programmatic (code)
Data Custom objects, fields and relationships, Schema Builder Complex data processing in Apex
Logic Formulas, validation rules, roll-up summaries, Flow Apex triggers and classes
User interface Lightning App Builder, page layouts, Dynamic Forms, quick actions Lightning Web Components (and older Aura components and Visualforce)
Who builds it Admins and app builders Developers
Maintenance Easier to change; upgraded automatically with each release Needs tests (Apex needs code coverage to deploy) and developer skills

Use declarative tools first. Choose code when a requirement goes beyond them, for example:

  • complex logic or calculations that flows and formulas can't express efficiently;
  • integrations that need custom web service calls or complex transformations;
  • a user interface that standard and AgentExchange components can't provide;
  • very high data volumes or performance-sensitive processing.

Exam tip: If a declarative feature meets every requirement, it's the answer. "Without writing code" points to clicks; pick Apex or a custom Lightning component only when the scenario rules out every declarative option.

Extending an org with AgentExchange

AgentExchange is Salesforce's marketplace. The new AgentExchange brings together the original AgentExchange for Agentforce, AppExchange and the Slack Marketplace in one place, so you may still see the AppExchange name. It lists agents, apps, Lightning components, flow solutions, Bolt solutions (industry templates), Slack integrations and consultants. Before building something from scratch, check whether a tested solution already exists.

Common reasons to look there first:

  • a common need, such as e-signatures, document generation, mapping or data quality, that partners have already solved;
  • a ready-made Lightning component for a record or home page;
  • Agentforce actions, topics or templates that extend an agent;
  • an industry solution, or an expert consultant for a project.

When evaluating a listing, check its reviews, security review, supported editions, pricing and whether it's a managed package. Install it in a non-production org first, such as a sandbox, test it, then install it in production for admins only, all users or specific profiles. Bolt solutions are different: deploying one needs the services of the partner who created it.

Exam tip: "A common requirement, quickly, without building it" points to AgentExchange. Always test an installed package in a sandbox before production.

Object and field access

Users see an object or a field only if their profile or a permission set allows it.

Three layers of access. Object access comes from the profile and permission sets: Read, Create, Edit, Delete, View All and Modify All. Field access comes from field-level security: visible or read-only per profile or permission set. Record access comes from sharing: org-wide defaults, the role hierarchy, sharing rules, manual sharing and teams. A user needs all three: access to the object, the field and the record. Object access Profile and permission sets: Read, Create, Edit, Delete, View All, Modify All Field access Field-level security: visible or read-only, per profile or permission set Record access Sharing: org-wide defaults, role hierarchy, sharing rules, manual, teams A user needs all three: access to the object, the field and the record
Object, field and record access are separate layers

Feature What it controls
Profile Every user has exactly one. Sets baseline settings, such as login hours and page layout assignments, and permissions
Permission set Grants extra permissions to specific users without changing their profile
Permission set group Bundles permission sets for a job role; a muting permission set can remove permissions within the group
Object permissions Read, Create, Edit, Delete, View All and Modify All on each object
Field-level security Whether a field is visible or read-only for a profile or permission set
Record types Different picklist values, page layouts and business processes for different groups
  • Permissions are additive: a user gets the combination of their profile and all their permission sets. Salesforce recommends a minimal profile plus permission sets.
  • You can't edit the object permissions of a standard profile: clone it, or use permission sets.
  • A permission set group can have one muting permission set, which removes permissions within that group only; a user who gets the permission from somewhere else keeps it.
  • View All and Modify All on an object give access to all its records, ignoring sharing.
  • Removing a field from a page layout doesn't secure it: it can still appear in reports, list views and the API. Use field-level security to hide a field.

Exam tip: "Give a few users extra access" is a permission set, not a new profile. "Hide a field from some users everywhere" is field-level security, not a page layout.

Record access and sharing

Object permissions decide whether a user can work with an object at all; sharing decides which records they can see.

Record access is built up in layers. At the bottom, org-wide defaults set the most restrictive baseline: Private, Public Read Only or Public Read/Write. The role hierarchy lets managers see records owned by users below them. Sharing rules, owner-based or criteria-based, open access to roles and groups. Manual sharing and teams handle one-off exceptions for single records. Sharing only opens access up; restriction rules can narrow it. Org-wide defaults the most restrictive baseline: Private, Public Read Only, Public Read/Write Role hierarchy managers see records owned by users below them Sharing rules owner-based or criteria-based, to roles and groups Manual sharing and teams one-off exceptions for single records more access Sharing only opens access up; restriction rules can narrow it
Record access opens up from the org-wide default

Layer What it does
Org-wide defaults The baseline for records a user doesn't own: Private, Public Read Only, Public Read/Write, or Controlled by Parent for detail objects in master-detail relationships
Role hierarchy Users can see records owned by users below them in the hierarchy. It doesn't have to match the org chart. For custom objects, Grant Access Using Hierarchies can be turned off
Sharing rules Open access to groups or roles: owner-based (records owned by certain users) or criteria-based (records with certain field values)
Manual sharing A record's owner, or someone above them, shares one record with a user or group
Teams Account, opportunity and case teams share records with team members
Restriction rules Limit which records certain users can see, even if sharing would allow them

Choosing a solution:

  1. Set the org-wide default to the most restrictive access any user should have.
  2. Open access up for managers with the role hierarchy.
  3. Open it for groups of users with sharing rules: criteria-based when access depends on a field value, owner-based when it depends on who owns the record.
  4. Use manual sharing or teams for one-off exceptions and groups that change unpredictably, such as an interview panel.

Sharing can only extend access beyond the org-wide default. It can't take access away, and the org-wide default can never give users more access than their object permissions allow. Detail objects in a master-detail relationship have no owner, so they can't have sharing rules, manual sharing or queues: they inherit access from the master.

Exam tip: If some users must not see records, the org-wide default must be private (or use restriction rules); sharing rules then open access for the others. "Based on a field value" means a criteria-based sharing rule.

Reports, report types and dashboards

Report types decide which objects and fields a report can use. Standard report types exist for standard objects and for custom objects that have Allow Reports selected. A custom report type sets:

  • the primary object, and up to three related objects below it;
  • whether related records must exist (A with B) or not (A with or without B);
  • which fields are available, and their layout.

The four report formats. Tabular is a simple list of records. Summary groups rows, with subtotals. Matrix groups records by rows and columns. Joined shows several blocks from several report types. Custom report types set a primary object plus related objects, with or without related records. Tabular a simple list of records Summary rows grouped, with subtotals Matrix grouped by rows and columns Joined several blocks, several report types Custom report types: a primary object plus related objects, with or without related records
Report formats and what each one shows

Report format Shows
Tabular A simple list of records, like a spreadsheet
Summary Rows grouped, with subtotals
Matrix Records grouped by rows and columns
Joined Up to five report blocks, each from its own report type, side by side

Useful report features:

  • Filters, including cross filters (for example, accounts without opportunities). Filter logic combines field filters with AND and OR.
  • Bucket fields group values into categories without a new field.
  • Summary formulas calculate on grouped totals; row-level formulas calculate a value for each row.
  • Charts and conditional formatting need a grouped report.

A dashboard shows components, such as charts, gauges, metrics and tables, built from source reports. Joined reports and historical trend reports can't be source reports, and a tabular report needs a row limit. Each dashboard runs as a running user, so everyone sees that user's data. A dynamic dashboard runs as the logged-in user, so each viewer sees only the data they can access; it can't be saved in a private folder. Reports and dashboards are shared through folders.

Exam tip: "Show records that have no related records" needs a custom report type with "A with or without B", or a cross filter. "Each manager sees their own team's numbers" is a dynamic dashboard.

Hands-on exercise

Secure and report on a recruiting app

Decide the access model and reporting for a simple custom app.

Use a free Salesforce Developer Edition org — never a production org.

0 of 7 steps done

How to check your work: Your design uses the most restrictive org-wide defaults, opens access only through sharing, protects salary with field-level security and a permission set, and uses a custom report type that includes positions with no applications.

Domain quiz: Salesforce Fundamentals

10 questions from the 37 in this domain, different each time and checked as you go. Anything you miss is saved to Mistakes review.

Questions
10
Time
Untimed
Feedback
After each answer

New questions each time you start, drawn from the bank, unseen ones first.

Data Modeling and Management