Activity Forums Salesforce® Discussions Can we use mixed sobjects dml in one transaction?

  • Rajan

    Member
    March 30, 2018 at 3:58 am

    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.

  • Adarsh

    Member
    March 30, 2018 at 5:47 am

    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.

  • Archit

    Member
    March 30, 2018 at 8:17 am

    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.

Popular Salesforce Blogs

Popular Salesforce Videos

Salesforce Admin Certification 2020 Questions Explained with References - Part II

Video in

How to prepare and pass Salesforce Admin Certification with Practice Exam Questions 2020 practice questions and answers for the Salesforce Administration Salesforce Certified Admin Exam Questions Salesforce Administrator Certification Exam…