You need to sign in to do that
Don't have an account?
sheila srivatsav
ProcessBuilder debug log and test class
I created a simple process builder to update contact assistant phone with the acocunt phone whenever a new acocunt record gets created.
My requirement is
a] can we write a test class for the same ? if possible can we cover positive and negative test cases.
b] How to debug process builder if error occurs; where to check for the error.
thanks
sheila
My requirement is
a] can we write a test class for the same ? if possible can we cover positive and negative test cases.
b] How to debug process builder if error occurs; where to check for the error.
thanks
sheila
a] can we write a test class for the same ? if possible can we cover positive and negative test cases.
No need to write the test class for the process builder but you can insert the data into the test class with all possiable out come
b] How to debug process builder if error occurs; where to check for the error.
When the process started:
In debug logs, a process criteria node is represented by a FLOW_RULE_DETAIL event. myRule_1corresponds to the first criteria node in the process. Because the result of myRule_1 is true, the process executes the actions associated with the first criteria.
https://help.salesforce.com/articleView?id=process_troubleshoot_debuglogs.htm&type=5
All Answers
a] can we write a test class for the same ? if possible can we cover positive and negative test cases.
No need to write the test class for the process builder but you can insert the data into the test class with all possiable out come
b] How to debug process builder if error occurs; where to check for the error.
When the process started:
In debug logs, a process criteria node is represented by a FLOW_RULE_DETAIL event. myRule_1corresponds to the first criteria node in the process. Because the result of myRule_1 is true, the process executes the actions associated with the first criteria.
https://help.salesforce.com/articleView?id=process_troubleshoot_debuglogs.htm&type=5
You don't need to write any test class for process builder, as it's provided by Salesforce.
The process builder does the action that you define in it. If you're not getting desired results, please look into the evaluation criteria you have set, and check the actions you have set for each of the evaluation criteria.
To check logs
If you've enabled debug logs for yourself in the Salesforce org. You can update one record, which will generate log.
Open that recently created log (Setup -> debug logs) created for your user account.
Search for the process builder name in the log, you will get realted info there.
If this helps solve your problem, please mark this as BEST ANSWER