2

I set up a process to update the owner of a custom object (Program),

When Formula evaluates to true: [Program__c].OwnerId <>[Program__c].Franchise__c.OwnerId Allow process to evaluate a record multiple times in a single transaction? NO Do you want to execute the actions only when specified changes are made to the record? NO

Immediate Action: for Object Program__c Set Object Variable: Field: Owner ID Value: Program__c.Account__r.OwnerId

The Process works when Programs are updated through Salesforce, but when a Bulk API process ran I received this error message:

Encountered unhandled fault when running process Program_Owner_Update/301F000000006kW exception by user/organization: 00DA0000000IbPA/{4}

UPSERT --- UPSERT FAILED --- ERRORS : (ALL_OR_NONE_OPERATION_ROLLED_BACK) Record rolled back because not all records were valid and the request was using AllOrNone header --- for SFDC record with ID :,

caused by element : FlowRecordUpdate.myRule_1_A1

caused by: UPSERT --- UPSERT FAILED --- ERRORS : (ALL_OR_NONE_OPERATION_ROLLED_BACK) Record rolled back because not all records were valid and the request was using AllOrNone header --- for SFDC record with ID : ,

Salesforce Error ID: 572482331-21762 (-569115646)

Can the process builder be used with Bulk API updates?

3
  • Have you tried with All Or None turned off? Do any records go through?
    – Adrian Larson
    Commented Feb 17, 2015 at 15:42
  • I'm using a python script to run a csv through DemandTools. I don't know if DemandTools has an All or None option.
    – Ian Stubbs
    Commented Feb 17, 2015 at 17:52
  • @AdrianLarson I don't see anywhere in the documentation that All or None is supported on the Bulk API. It is suppose to work that way by default.
    – NSjonas
    Commented Oct 26, 2016 at 21:30

2 Answers 2

2

So it appears that if Process Builder fails on any record, it currently causes the entire batch to rollback.

The official workaround from Salesforce is to set the batch size to 1. The claim this will only cause a minimal impact to sync times... I beg to differ.

In my cases I was getting Unable to Lock Row exceptions because the Flow was updating related records (and two flows tried to update the same one). Turning off parrellel processing can help this, but no guaranteed you won't run into Row Lock issues due to users.

0

Process builder will have to use APEX @InvocableMethod to support bulk API and do logic in the apex class .

3
  • Does this mean that the Process Builder can't be used on objects that are updated by the Bulk API?
    – Ian Stubbs
    Commented Feb 24, 2015 at 23:19
  • looks like for now atleast .It can be but tie with apex .I mean handle the input to apex from process builder Commented Feb 25, 2015 at 2:46
  • Safe Harbor: Salesforce devs shared with me that 'bulkification' is on the immediate roadmap for Process Builder.
    – DavidWaugh
    Commented Oct 2, 2015 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .