Thursday, July 21, 2016

Process Builder Exception : The record couldn’t be saved because it failed to trigger a flow

The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3xxxxxxxxxxxxxx.  Contact your administrator for help.

The process builder is to update Country Contact with Account Country if the Contact Country is blank based on condition below :


When user uploads the Contact data without Account data it will throw an exception and I receive an email contains information below which is not so helpful.

An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Country__c because it hasn't been set or assigned.

Logically it should not run the process builder at the first place because the conditions are not fulfilled.I plan to raise ticket to Salesforce until I accidentally change the sequence of the conditions to :

Note I put AccountId condition before checking the Account Country__c.I run another test and wallahhh...the exception is gone.Contact is successfully inserted with Account details.I haven't see (yet) any documentation regarding on condition sequence in Process builder but it makes sense that we need to check the AccountId first before we check Account Country.

Hopefully this is helpful.Please let me know what your think.

No comments:

Post a Comment