Salesforce Fact #900 | Getting error record details when allornone flag is true

We can use Database.SaveResult class to know which records failed during DML operation when the allornone flag is false.

Similarly, we can get the details of error records using DmlException when allornone flag is true.

Reference: https://salesforce.stackexchange.com/questions/410070/return-database-saveresult-when-allornone-is-set-to-true

Attached are the screenshots.







Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow