Activity › Forums › Salesforce® Discussions › Can we use mixed sobjects dml in one transaction?
Tagged: DML in Salesforce, DML Operation, DML Statement, Salesforce sObject, sObject Field, sObject List Type, Transaction in Salesforce
-
Can we use mixed sobjects dml in one transaction?
Posted by Ankit on March 29, 2018 at 7:39 PMCan we use mixed sobjects dml in one transaction?
Archit replied 8 years, 1 month ago 4 Members · 3 Replies -
3 Replies
-
Hi ankit ,
You can’t use the following sObjects with other sObjects when performing DML operations in the same transaction.
You can only insert and update a group in a transaction with other sObjects. Other DML operations aren’t allowed. - [adinserter block='9']
-
Hi Ankit,
You can use external ID fields as foreign keys to create parent and child records of different sObject types in a single step instead of creating the parent record first, querying its ID, and then creating the child record.
…
You can create related records that are up to 10 levels deep. Also, the related records created in a single call must have different sObject types. For more information, see Creating Records for Different Object Types in the SOAP API Developer’s Guide.
-
Hello Ankit,
No, You can’t use the following sObjects with other sObjects when performing DML operations in the same transaction.
Thanks!
Log In to reply.