Print this page

Troubleshooting Workflows with Debug Logs

Knowledge Article Number 000187503
You can use Debug Logs to troubleshoot Workflow Rules.  They are useful when you encounter scenarios similar to this:
  • Workflow rule seems not to trigger even though record meets criteria.
  • You want to understand the sequence in which workflows are being executed. 
The first step for all the scenarios above, is to create a Debug Log for the user who is performing the action, after then log is created, you can search for the specific details that are relevant to the rule in question.

A) Creating a Debug Log for the affected user
  1. Setup | Monitoring | Debug Logs | Click New
  2. On the lookup field , search for the user who is performing the action
  3. Reproduce the action in question (create/edit a record to trigger the workflow)
  4. Go back to Setup | Monitoring | Debug Logs and click on the first log entry.
  5. View the details
Note: Debug log would only be able to capture logs from actions being done in the UI once the Save button is clicked

B) Understanding the Debug Log details


When a workflow rule is evaluated, you will see something similar to this:

|WF_CRITERIA_BEGIN|[ObjectName Record Name RecordID]|WorkflowRuleName|WorkflowRuleNameID|ON_ALL_CHANGES

16:30:34.838 (838624000)|WF_FORMULA|Criteria
16:30:34.838 (838633000)|WF_CRITERIA_END|false
WF_ACTION| Field Update: 2

  • |[ObjectName Record Name RecordID|: The object in question (leads, contacts, accounts, etc), the name of the record and the Id of the record.
  • WorkflowRuleName|WorkflowRuleNameID: The name and Id of the workflow rule that is being evaluated against the record.
  • WF_CRITERIA_END|true/false: Whether the record meets the rule criteria. If you see the word True, then it means that the record meets the rule criteria. If you see the word False, it means that the record does not meet the rule criteria. 
  • WF_ACTION|: The actions that are being executed if the record meets the criteria.
You can use this information to determine:
  • Whether the record meets the rule criteria
  • The order in which rules are evaluated (by looking at the sequence of workflows being evaluated)

Example |  Assume you have the following:
  • A field update that changes the Opportunity Stage to Closed Won
  • A Opportunity record that meets the rule criteria

When the Opportunity record is saved, the Stage is changed to Review, instead of Closed Won. Upon creating a debug log, you find something similar to this:
|WF_FIELD_UPDATE|[ObjectName Record Name RecordID]|WorkflowRuleName|WorkflowRuleNameID
|WF_FIELD_UPDATE|[ObjectName Record Name RecordID]|WorkflowRuleName|WorkflowRuleNameID
|WF_ACTION| Field Update: 2;
This means that there are actually two field updates, and both of them are being executed (the record meets the criteria of both field updates).
It is possible that the 2nd field update is updating the same field with a different value. 

promote demote