Add Pending Vendor State to RQST workflow; add measurement of time for this state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Scenario: In enhancement req table when state is changed from pending vendor to WIP(or other state), we need to update the total pending vendor time field with duration between pending vendor & WIP
Here I have created duration type field which will store total pending vendor time.
To achieve this I am taking difference between current date time and pending vendor start time(custom field),then the difference need to be updated as duration in pending vendor total duration type field. How can we achieve it in BR script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Sounderrajan K ,
You can do this with a before/after update Business Rule on the enhancement table using gs.dateDiff (seconds) and a GlideDuration to set your duration field.
Please refer to the below link:-
- https://www.servicenow.com/community/itsm-forum/issue-in-gs-datediff-calculations-because-of-date-fo...
- https://www.servicenow.com/community/developer-forum/how-to-set-duration-field-using-back-ground-scr...
If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution in the future it will be helpful to them.
Thanks & Regards,
Shaik Mustaq