Saving the model

  • 1
  • Question
  • Updated 5 months ago
If we are saving the model which have 2 records. One is mark as delete and another one is for saving. and using snipped to save the model. What is the flow for saving? Firstly delete will perform or insertion.
Photo of Geeta

Geeta

  • 300 Points 250 badge 2x thumb

Posted 5 months ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,828 Points 20k badge 2x thumb
I assume you are saving to a Salesforce datasource.  These order of operation things work in different ways based on the data source. 

Here's how order of operations on Salesforce works.
  • We group up all transactions (inserts, updates, deletes) on a per model basis, processing everything one model at a time
  • For each model being processed, transactions are processed and committed in the following order: All Inserts, All Updates, All Deletes
  • Rollbacks occur for any single transaction that fails, unless the "Rollback on any error" option is checked

Let me know if this helps answer your question.