Hi
We cannot perform DML operation on setup and nonsetup Objects in salesforce.
Example for Non-setupObject - standard object like Account,contact etc and any custom object.
Example for setObject -
Group
Group Member
Field Permission
Object Permissions
Permissionset
Permissionset Assignment
Queue sObject
SetupEntityAccess
User
UserRole
UserTerritory
Territory
We cannot perform DML operation on setup and nonsetup Objects in salesforce.
Example for Non-setupObject - standard object like Account,contact etc and any custom object.
Example for setObject -
Group
Group Member
Field Permission
Object Permissions
Permissionset
Permissionset Assignment
Queue sObject
SetupEntityAccess
User
UserRole
UserTerritory
Territory
If you are using a Visualforce page with a custom controller, you can only perform DML operations
on a single type of sObject within a single request or action. However,
you can perform DML operations on different types of sObjects in subsequent
requests, for example, you can create an account with a save button,
then create a user with a submit button.
You can perform DML operations on more than one type of sObject
in a single class using the following process:
For More information please refer the below link.
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_dml_non_mix_sobjects.htm?SearchType=Stem
- Create a method that performs a DML operation on one type of sObject.
- Create a second method that uses the future annotation to manipulate a second sObject type.
For More information please refer the below link.
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_dml_non_mix_sobjects.htm?SearchType=Stem
Hi,
ReplyDeleteHow to Create a Permission Set using Apex DML and assign to the user in salesforce.
please help me.........
Hi Mahesh
ReplyDeletesee the below link,
https://developer.salesforce.com/forums/ForumsMain?id=906F000000090FOIAY
this might be helpful for you.
Thanks