Sunday, October 14, 2018

Print Status for Closed Sales Order Only

I. Create a custom field.
 
1. Navigate to Customization > Lists, Records, & FieldsTransaction Body Field > New.
2. Enter Custom Status in Label field.
3. Unmark the Store Value field.
4. In the Applies to tab > Mark Sale checkbox.
5. In the Validation & Defaulting Tab > type the following on "CASE WHEN {status}='Closed' THEN {status} ELSE Null END" in Default Value field.
6. Mark the Formula checkbox.
7. Click Save Button.
 
II. Create a workflow.
 
1. Navigate to Customization > ScriptingWorkflows > New.
2. Under Basic Information Group:
3. Enter Custom Workflow in Name field.
4. Choose Transaction on Record Type field.
5. Choose Sales Order on Sub Types field.
 
6. Under Initiation Group:
7. Mark on Update checkbox
 
8. Under Condition Group:
9. Mark Custom Formula Option field.
10. Type the following in Formula field "UPPER({field id of Custom Status field}) is null".
11. Click Save.
 
12. Click New State.
13. Enter Custom State in Name Field.
14. Click Save.
 
15. Click the Custom State button.

16. Click Edit button.
17. Enter Status Print in Name field.
18. Navigate to Action Tab > Click New Action Button > Then click Set Field Display Label.
19. Under Parameters Group:
20. In Field dropdown choose Custom Status (Field created in Step 1).
21. Click Save.
 
III. Customize Preferred Sales Order Form.
 
1. Navigate to Customization > Lists, Records, & FieldsTransaction Forms.
2. Click Customize on Standard Sales Order.
3. Navigate to Printing Fields Tab > Body Tab.
4. Unmark Status field on Print/Email checkbox.
5. Mark Custom Status field on Print/Email checkbox.
6. Rename Custom Status field to Status under Label Column.
7. Click Save.

Note: By following the steps above, the Custom Status field and its value will only be visible in the printed Sales Order if the status of the order is closed.

 



No comments:

Post a Comment