Automation in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 03:15 AM
For example, for UK customer, XYZ is the HR representative who approves all the "catalog item name", however he is usually also the one raising these requests herself. Can we automate it somehow so that he would not have to approve her own request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 04:41 AM
You can use below "IF" script before the approval action in the workflow:
Thank you!!
Dnyaneshwaree Satpute
Tera Guru

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 03:04 PM
You can refer to the below script to automatically approve the RITM when opened by and request for is the same person. You need to create If action on the workflow. Then when "yes" returns, you can create approval action in the workflow to approve the RITM automatically.
//Please double check the field names
var openedBy = current.request.opened_by;
var reqFor= current.request.request_for;
answer = ifScript();
function ifScript() {
if (openedBy == reqFor) {
return 'yes';
}
return 'no';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 03:16 PM
Hi @sandeshraut198 ,
Business Rule #1
- Table : Approval [sysapproval_approver]
- When to run : before update
Business Rule #2
- Table : Change Request [change_request]
- When to run : after insert/update
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda