Monday, May 20, 2019

Add the Company Name in a Open Sales Order Report

I. Create a Custom field for Sales Order.
1. Navigate to Setup > Customization > Transaction Body Fields > New.
2. Provide a Label.
3. Make sure that Store Value = T.
4. In the Applies to tab, check Sales.
5. Set other Preferences as necessary.
6. Save.

II. Create a Workflow with a Set Field Value State.
1. Navigate to Customization > Workflow > Workflows > New.

--Basic Information
2. Provide a Name.
3. Set Record Type = Transaction
4. Set Sub Types = Sales Order

5. Choose Event based.
6. Mark On Create to set the field value when a new sales order is created
7. Mark On Update to set the field value every time a sales order is edited.
8. Set Trigger Type to - All -
9. In Context, select User Interface. You may also choose other point of entries where cases are entered and the field should be set.

10. Save the Workflow.
11. Edit the Workflow again.
12. Click New State.
13. Click State 1 in the Workflow Diagram.  In the right panel, click on New Action.  Choose Set Field Value.
14. Set Trigger On = Before User Submit.

15. Set Field to the custom field created in Step I.

16. Check From Field.
17. Set Record = Customer.
18. Set Field = Company Name.

III. Expose the custom field in a custom Open Sales Orders report.
1. Navigate to Reports > Order Management > Open Sales Order > Customize.
2. In the Edit Columns page > Add Fields pane, expand Open Sales Orders.
3. Select the custom field created in Step I.
4. Change the placement of the column if necessary.
5. Save.

IV. Perform Mass Update on Existing Sales Orders to update the custom field.
1. Navigate to Lists > Mass Update > Mass Updates.
2. Expand General Updates.
3. Choose Sales Orders.
4. Set fields in the Criteria and Result tabs as necessary.
5. In the Mass Update Fields tab, check the custom field created in Step I.
6. Click the Description icon in the Formula column.
7. In the Mass Update pop-up window, select Customer (Main Line) Fields.. > Company Name in the Field drop-down.
8. Click Set.
9. Click Preview.
10. Click Perform Update to perform the update without saving.
11. Click Save to save the mass update and perform it at a later time.

1. For existing Sales Orders, the workflow will run only when the transaction record is edited then saved.
2. For new Sales Orders, the Company Name custom field will be populated after clicking Save.
3. The workflow will be able to populate the custom field even when it is hidden.
4. This is an alternative solution for Enhancement 106404: Report Component > Customer/Job - Expose the Company Name field.

Other Helpful Topics are Set Field Value and Creating Your First Workflow.

No comments:

Post a Comment