- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 12:13 PM
We have a requirement for 1 specific request. We want the Due Date on the sc_req_item to be empty on insert, and then make it mandatory before the manager approves it. The manager should get a message to set the due date before approval and then SCTASK is also set to the same date as RITM.
With the help of a UI Action, I cleared the field and made it mandatory for the specific item but I was able to approve it and the date field was filled right after the approval automatically.
- How to stop the approval state to be changed before the due date is filled?
- How to copy the due date from RITM to SCTASK?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 02:55 PM
Hi @GB14 ,
1. You can write a on update,before business rule on sysapproval_approver table when state changes to approved. This can check if "Approval for" field contains RITM, then retrieve the RITM and check if due date is filled.
If due date is empty, abort the action and display error message explaining to set the due date before approval
2. Write before business rule on RITM table when due date changes.
GlideRecord and Query the sc task table with parent=RITM and update all tasks due date with RITM due date
Hope it helps you complete the requirement
Regards,
Manmohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 02:55 PM
Hi @GB14 ,
1. You can write a on update,before business rule on sysapproval_approver table when state changes to approved. This can check if "Approval for" field contains RITM, then retrieve the RITM and check if due date is filled.
If due date is empty, abort the action and display error message explaining to set the due date before approval
2. Write before business rule on RITM table when due date changes.
GlideRecord and Query the sc task table with parent=RITM and update all tasks due date with RITM due date
Hope it helps you complete the requirement
Regards,
Manmohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 06:25 AM
For some reason, I cannot stop the approval for some reason. The below is my BR. Am I missing anything?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 06:50 AM
I just fixed the above approval part. working on step # 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 06:52 AM
@GB14 ,
Increase you business rule order to 1100 or something like that and then try. It should be higher than any other business rule on approval table