Automation Script : How to create a WO from a SR when some condition is satisfied
Rhong 270000CPG9 Visits (16508)
You may want to create a Work Order(WO) automatically when saving a SR record if a condition for a field is satisfied.
Please reference below automation script example.
The case: If WOREQUIRED is true when saving a SR record whose assetnum is 11230 , create a WO from that SR.
Please follow the steps.
1. Go to the Database Configuration - Open TICKET object
- Create the attribute "WOREQUIRED" with YORN type. The default value is set as 0. Apply DB Changes in Admin Mode.
2. Go to the Application Designer - Open SR application.
- Add a checkbox control for the "WOREQUIRED" attribute.
3. Go to the Automation Scripts application.
- Create Script with Object Launch Point
- When saving an existing SR record whose assetnum is 11230, if WOREQUIRED field is checked, a followup WO will be created.
4. Now, go to the Service Requests application.
- Open a SR
- Set assetnum as 11230, set siteid as BEDFORD and have WOREQUIRED field checked.
Then, you can see that a follow up WO is created.
This is a simple test case. You may need to add more logic in script based on your requirement.