Testing and Debugging Work Orders for Configured Items
When setting up products, you can test and debug the work order creation process for configured items. With the debugger tool integrated into NetSuite CPQ Manufacturing, you can identify and fix any potential issues eliminating the need for manual, repetitive actions like opening and saving sales orders. You can use the debugger tool to test:
-
The standard work order creation process.
-
The work order creation by scripting.
Four different modes are available to interact with the SuiteScript module used to create work orders. These modes correspond to the script types that can launch the work order creation process:
-
Client mode – Launches the work order creation process from a client script. This mode is the same as clicking the Convert WO button on the sales order. You can view detailed logs directly in the console. Use this mode to test that materials and routing steps are properly set up to create work orders.
-
Suitelet mode – Launches the work order creation process from a Suitelet. The console only provides basic information about whether the work order process has started and completed. You can find detailed information in the logs of the CPQM-ST-WOC script. This mode helps identify issues when the testing is successful in client mode but fails in map/reduce mode.
-
Scheduled mode – Launches the work order creation process from a scheduled script. Use this mode to test sales orders with a limited number of configured line items to be converted. The console only provides basic information about whether the process has started. You can find detailed information in the logs of the CPQM-SC-CWO script.
Note:If your sales orders contain a high number of configured items to be converted to work orders, switch from the scheduled script to the CPQM-MR-WOC map/reduce script. Do not use the scheduled script in new implementations.
-
Map/reduce mode – Launches the work order creation process from a map/reduce script. Use this mode to test sales orders with a large amount of configured line items to be converted. The console only provides basic information about whether the process has started. You can find detailed information in the logs of the CPQM-MR-WOC script.
Additionally, if you check the Force conversion box, up-to-date work orders are converted again. This option:
-
Deletes up-to-date work orders for the selected sales order.
-
Converts configured line items with up-to-date work orders.
-
After testing the work order creation process, make sure you remove the created work orders to continue with the testing.
To create a testing task to create work orders from a sales order:
-
Go to CPQ > Manufacturing > Work Oder Creator.
-
Click New CPQM WO Creator.
-
Enter a name for the testing task.
-
Select the sales order.
-
Click Save.
-
Click Edit to start testing the work order creation process.
-
(Map/reduce mode only) If you plan to run the testing task in map/reduce mode, you can check the Force conversion box. This option reconverts up-to-date work orders.
-
Depending on the testing mode you want to use, click one of the following buttons to start the testing task:
-
Client
-
Suitelet
-
Scheduled
-
Map/Reduce
-
-
When the testing process has completed:
-
Open the sales order from the testing task.
-
View the Create WO line field.
If the field contains a link with a number, the work order has been created.
-
-
If you experience issues when creating work orders, verify the logs.
To view script logs for server-side scripts, go to Customization > Scripting > Scripts. Open the script record and click the Execution Log subtab. To delete logs, click the Remove All button.
-
After verifying the work orders and the logs, go back to the testing task and delete the created work orders by clicking the Remove WOs button.
You can view logs about the deletion process in the console.