Loading

Error 'ALL_OR_NONE_OPERATION_ROLLED_BACK' and Process Builder fails

Data pubblicazione: Oct 13, 2022
Descrizione
A Process fails with an error that mentions "(ALL_OR_NONE_OPERATION_ROLLED_BACK) Record rolled back because not all records were valid and the request was using AllOrNone header"

 
Risoluzione
Process Builder record updates are performed using the AllOrNone header (https://developer.salesforce.com/docs/atlas.en-us.204.0.api_meta.meta/api_meta/meta_allornoneheader.htm). This error happens when a Process tries to update multiple records, and there is an error updating any of those records. 


It is important to understand that the "ALL_OR_NONE_OPERATION_ROLLED_BACK" only tells us that there was some (other) error when the process tried to update multiple records. It is that underlying error must be identified and addressed to solve these issues. 


If possible, check debug logs for validation rule failures and other errors which can give insight into the cause of the error encountered by the Process.

Sometimes debug logs cannot be captured easily, or may not give insight to the cause. In that case the surest way to isolate the underlying error is to try performing the same actions using a tool which does allow partial successes. For instance:
  1. Review the complete Flow Fault error report which is sent to the creator of the Process that is failing. Identify everything that Process tried to do during that interview. (E.g. If it failed while trying to update some Accounts, the first step is to identify exactly which Accounts it was trying to update and exactly what values it was trying to set).
  2. Create a .csv file with the information gathered in 'A'. (E.g. If the error report says our process tried to update 100 Account Id's and set 'Industry' to some value, then we should have a .csv file with those 100 Account Ids and the Industry values the process tried to set on each one).
  3. Use Data Loader or Workbench to perform an Update using that .csv file. One or more of the records being updated should still fail, and an error message will be given for failure of those records. (E.g. Continuing the example, maybe one Account in our .csv fails to update because a required field is unpopulated).
  4. Now that the underlying error(s) that caused the "ALL_OR_NONE_OPERATION_ROLLED_BACK" error are known, those errors can be addressed. (E.g. Again continuing the above example, we could now ensure that the required field is populated on all Accounts or consider removing that requirement).
Numero articolo Knowledge

000383071

 
Caricamento
Salesforce Help | Article