Activity › Forums › Salesforce® Discussions › What are setup objects in Salesforce?
-
What are setup objects in Salesforce?
Posted by shariq on August 1, 2017 at 1:01 PMI want to know the basic definition of setup objects with examples.
Parul replied 7 years, 8 months ago 4 Members · 3 Replies -
3 Replies
-
hi shariq,
Setup objects are those which interacts with metadata like User, Profile, Layout etc. All other object (Standard and Custom) are non setup object.
One important note is that we cannot perform DMLs on setup and non setup objects in same transaction. Workaround is that you need to use asynchronous requests (@future) or use batch as it runs in its own system context.
In test class you can use Sytem.RunAs with two different users to separate out transactions for setup and non setup objects.
- [adinserter block='9']
-
Hello Shariq,
For setup objects
- These objects only works for metadata, a very common example is User object. We use setup objects to interact with metadata for declarative development.
- Represents a data service that adds and updates data in existing records in an org.
Hope this answer would be helpful!!
-
The setup objects in Salesforce are objects that work for metadata like User and Profile and on setup object we can not perform DML operation.
Thanks
Log In to reply.