Setup and Non-Setup Objects in Salesforce

Salesforce is built on a powerful metadata-driven architecture. Understanding the difference between Setup and Non-Setup objects is essential for developers, admins, and architects working on automation, integrations, and deployments. These object types affect how you query data, build automation, and interact with the Tooling API and Metadata API.


What Are Setup Objects in Salesforce?

Setup objects, also known as metadata objects, are used to store configuration and customization settings for a Salesforce organization. These objects define how the Salesforce platform operates—such as automation rules, custom fields, page layouts, and Apex code. They do not hold transactional or user-entered business data but rather influence the behaviour of the org.

Examples include:

  • CustomObject (defines a custom object)
  • ApexClass (stores Apex code)
  • WorkflowRule
  • Profile
  • PermissionSet

These objects configure how the platform behaves, rather than storing actual business or transactional data.

How to Query Setup Objects:

You cannot query Setup objects directly in Apex using standard SOQL. Instead, use:

  • Tooling API – Example:GET /services/data/v62.0/tooling/query/?q=SELECT+Id,+Name+FROM+ApexClass
  • Metadata API – Used to retrieve and deploy metadata

You can use Workbench to Query on Non-setup Object via REST Explorer : Example of Query

 

Some setup object records are visible in Setup UI (e.g., Flows, Profiles), but others require API access.


What Are Non-Setup Objects in Salesforce?

Non-Setup objects are the standard or custom objects used to store business and transactional data. These are the objects end users interact with in the Salesforce UI (e.g., Accounts, Contacts, Opportunities), and developers often use them in Apex classes, SOQL queries, and reports.These are some common non setup object example :

  • Accounts
  • Contacts
  • Opportunities
  • Cases
  • Custom sObjects like Invoice__c, Project__c

These objects are accessed via the standard SOAP, REST, or Bulk APIs, and are available in Apex without special handling.

How to Query Non-Setup Objects:

Use standard SOQL in Apex, Developer Console, or Workbench:

Example of Query  : SELECT Id, Name FROM Account WHERE Industry != null

These objects are also accessible using:

  • REST API
  • SOAP API
  • Bulk API

Key Differences: Setup vs Non-Setup Objects

Feature Setup Objects Non-Setup Objects
Purpose Store configuration/metadata Store business/transactional data
Access API Tooling API, Metadata API REST, SOAP, Bulk API
Available in Apex SOQL No (require Tooling API) Yes
Governed by Org Settings Yes No
Example ApexClass, WorkflowRule Account, Opportunity

List of Common Setup Objects

Below is a list of frequently used Setup objects in Salesforce:

  • ApexClass
  • ApexTrigger
  • CustomObject
  • CustomField
  • Layout
  • PermissionSet
  • Profile
  • WorkflowRule
  • ValidationRule
  • Flow
  • RemoteSiteSetting
  • NamedCredential
  • EmailTemplate
  • Dashboard
  • Report
  • FieldPermissions

These objects define how Salesforce works and are commonly retrieved or deployed using metadata tools like Change Sets, ANT, or Salesforce CLI. For more detailed list of setup object you can click here to check : Click me

Note: Many setup objects require special permissions to access and are only available in specific API versions or via Tooling API.


List of Common Non-Setup Objects

Here’s a list of common Non-Setup objects:

  • Account
  • Contact
  • Opportunity
  • Lead
  • Case
  • Task
  • Event
  • Product2
  • PricebookEntry
  • Campaign
  • User
  • Custom business objects like:
    • Invoice__c
    • Project__c
    • Timesheet__c

These objects store the data your business users work with daily


Conclusion

Understanding the distinction between Setup and Non-Setup objects in Salesforce is key to mastering the platform’s architecture. It influences how you access, manage, deploy, and secure data and metadata. For developers and admins, this foundational knowledge ensures smoother automation, better deployment strategies, and efficient Salesforce integrations.

For more Salesforce development and admin tips, explore other expert articles on SalesforceHours.com.

 

 

RECENT POST

 

 

Leave a Comment