2

Based on salesforce documentation, second parameter in dml method is optional and default is false. Like: update(recordsToUpdate, allOrNone) But it seems to be incorrect, whenever i am updating any list and not giving second parameter, while updating if any one record is failed then all records present in the list are getting failed. I have to explicitly give false as second parameter, then only it is updating all other records. Am i the only one who is facing this problem? Thanks

4

The default is true (all fail if one fails)

This means that if you specify false, a failure will not abort the transaction.

The optional allOrNone parameter specifies whether the operation allows partial success. If you specify false for this parameter and a record fails, the remainder of the DML operation can still succeed. This method returns a result object that can be used to verify which records succeeded, which failed, and why.

Source here

|improve this answer|||||
  • That means salesforce documentations are incorrect. Thanks for your answer. – salesforce Developer Feb 7 '16 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.