To view workflow logs in NetSuite, you typically navigate to the specific record instance on which the workflow executed, then access the System Information subtab, followed by the Workflow History subtab, where you can delve into the log details for each state.
Understanding NetSuite Workflow Logs
Workflow logs are a vital feature in NetSuite, offering a detailed, chronological record of a workflow's execution on a specific record. They capture every step a workflow takes, including state transitions, action executions, condition evaluations, and any errors encountered. These logs are indispensable for:
- Debugging: Pinpointing why a workflow isn't behaving as expected.
- Validation: Confirming that your workflow logic is working correctly.
- Monitoring: Tracking the progress and performance of automated processes.
- Auditing: Reviewing past workflow actions for compliance or analysis.
Step-by-Step Guide to Viewing Workflow Logs on a Record
When a workflow runs on a NetSuite record (e.g., a Sales Order, Invoice, or Custom Record), its execution details are logged directly on that record. This is the primary method for investigating a workflow's behavior on a particular instance.
- Navigate to the Record: Begin by opening the specific NetSuite record instance where the workflow activity occurred. For example, if you're troubleshooting a workflow on a Sales Order, open that particular Sales Order.
- Access System Information: On the record page, locate and click on the System Information subtab. This subtab contains various technical details about the record.
- Open Workflow History: Within the System Information subtab, click the Workflow History subtab. This section lists all workflows that have interacted with the record, showing their current state and a history of their activity.
- View Individual State Logs: For the specific workflow state you want to examine, you will see a Log link next to it. Click this Log link for the state. NetSuite will then display all log entries for the selected state visit in a new window.
Within this execution log, you can view various types of information crucial for analysis, including:
- Server Triggers: These entries provide information about actions or events initiated by the NetSuite server that influenced the workflow's execution.
- Workflow Actions: Details about actions executed, such as setting field values, sending emails, or creating records.
- Condition Evaluations: Records showing whether specific conditions for transitions or actions were met (true) or not met (false).
- State Transitions: The exact timestamps and details of when the record moved from one workflow state to another.
- Error Messages: Any errors or exceptions that occurred during the workflow's processing on that specific state.
Viewing Consolidated Workflow Execution Logs (from Workflow Definition)
For a broader overview, especially during development, testing, or general monitoring, you can access a consolidated execution log directly from the workflow's definition. This view aggregates recent executions across multiple records.
- Navigate to Workflow Definitions: Go to Customization > Workflow > Workflows.
- Edit Your Workflow: Click Edit next to the specific workflow you wish to review.
- Access Execution Log Tab: Within the workflow definition page, click on the Execution Log subtab. This tab provides a list of recent workflow executions, which you can often filter by record, date, or status to find specific instances. This is particularly useful for debugging common issues or monitoring the overall health of your workflow.
Practical Insights for Analyzing Workflow Logs
Effective analysis of workflow logs can significantly speed up troubleshooting:
- Trace Chronologically: Always review log entries in their chronological order to understand the exact sequence of events.
- Identify Deviations: Look for any unexpected state transitions or actions that did not execute as planned.
- Pinpoint Error Sources: Pay close attention to error messages. They often provide precise details about the cause, such as invalid field values, missing permissions, or issues with associated scripts.
- Verify Conditions: Check the "Condition Evaluation" entries to ensure that conditions are evaluating to
true
orfalse
as you designed them. - Utilize Custom Log Actions: During development, insert "Log" actions within your workflow to output custom messages, helping you track specific variables or logic branches.
For more detailed information on configuring and troubleshooting NetSuite workflows, consult the official NetSuite Help Center.
Summary of Workflow Log Information
Here's a quick overview of the essential information you can expect to find in NetSuite workflow execution logs:
Log Entry Type | Description | Common Use Cases |
---|---|---|
State Transitions | Records when an instance moves from one workflow state to another. | Verifying workflow path, identifying unexpected loops. |
Action Execution | Details on successful or failed execution of actions (e.g., Set Field, Send Email). | Confirming actions are triggered, debugging action parameters. |
Condition Results | Shows whether specific conditions for transitions or actions evaluated to true/false. | Troubleshooting why a transition didn't occur or an action didn't fire. |
Server Triggers | Events initiated by the NetSuite server that influence workflow execution. | Understanding system-level interactions with the workflow. |
Errors | Any system errors or exceptions encountered during workflow processing. | Critical for identifying and resolving issues. |
Custom Logs | Messages defined by Log actions within your workflow. |
Debugging custom logic, tracking specific data points. |
By leveraging these logging capabilities, you can effectively manage and troubleshoot your NetSuite workflows, ensuring your business processes run smoothly.