Process Builder is a way of automating business processes. It is an upgraded version of the Workflow Rule. Whenever a user creates a process, the system automatically creates a Visual Workflow – and a Flow Trigger (which is now deprecated) – to call the Flow. Creation of the Flow happens behind the scenes; and therefore, a user does not need to interact with these ‘shadow’ (behind the scenes) Flows. Process Builder is a powerful tool for system administrators and developers to implement business processes without writing code. However, with great power comes great responsibility – If a user starts creating a new process for each requirement – or creating processes without understanding Salesforce limitations – then, a user may encounter many issues, either in future or, during testing/deployment phase.
In my last post Getting Started with Process Builder – Part 65 (Resolve ALL_OR_NONE_OPERATION_ROLLED_BACK Error), I discussed how to solve ALL_OR_NONE_OPERATION_ROLLED_BACK error by adding all the required fields to Process Builder action.
This article goes one step further; it explains another common error – FIELD_INTEGRITY_EXCEPTION Error. The article shows – (1) why errors could occur; (2) how to identify errors (by using a system generated fault email/debug log); and, finally, (3) how to solve the problem.
Business Use case
Donna Serdula is working as a System administrator at Universal Containers (UC). UC implemented Case Management a year ago in Salesforce. Serdula has a requirement from her manager that, as soon as a Case gets created without assigning it to an account, then auto assign such Cases to a Low Priority queue.
What is FIELD_INTEGRITY_EXCEPTION Error?
A user mostly encounters a FIELD_INTEGRITY_EXCEPTION error when he populates a lookup field with the wrong Id.
For example, while creating a contact via Process Builder if, in the place of AccountId, a user passes an Opportunity record id, then, the user will encounter FIELD_INTEGRITY_EXCEPTION error.
Below, I will show you how to avoid getting a FIELD_INTEGRITY_EXCEPTION Error while using the Process Builder.
First, I will create a case by passing the wrong ID (may be an account ID) for a Low Priority queue.
This will generate a FIELD_INTEGRITY_EXCEPTION error because you are only allowed to pass valid User or QueueID for a case owner.
Next, I will show you how to identify the root cause behind FIELD_INTEGRITY_EXCEPTION error followed by a way to solve it.