Scenario:
User would like to add an Approve Button on the Vendor Bill record. Once the Approve button is clicked, the Vendor Bill Status will be set to Approved.
Solution:
- Navigate to Customization > Workflow > Workflows > New
- Enter Name: Vendor Bill Approve Button
- Set the following fields:
- Record Type: Transaction
- Set Sub Types: Vendor Bill
- Execute As Admin: Checked
- Release Status: Released
- Enable Logging: Checked
- On View Or Update: Checked
- Click Save
- Click State 1
- On the Side Panel, click New Action
- Select Add Button
- Set the following fields:
- Trigger On: Before Record Load
- On Condition, click the Open Arrow Icon
- On the Pop up select the following values:
- Field: Approval Status
- Selection: Pending Approval
9. Click Save
10. On the Parameters, Set Label to Approve
11. Check Check Condition Before Execution
12. Click Save
13. Click New State
14. Drag State 2 below State 1
15. In the diagrammer, hover over the bottom of State 1. The cursor becomes a filled half-circle. Drag the icon to State 2 and release the mouse to create the transition.
16. Double Click the Transition Arrow
17. On the Execute on Button: Select the Approve button that was created
18. Click Save
19. Click State 2
20. On the Side panel, Click New Action
21. Select Set Field Value
22. On the Parameters, select Approval Status
23. On Value, mark Static Value
24. On Selection, select Approved
25. Click Save