- 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-18-2023 09:08 AM
1) Created a UI policy to make the field mandatory.
2) Cleared the value with the "set value" activity from the WF.
3) Created BR to stop approvals until the Due Date is not filled.
4) Mapped the Due date from RITM to SCTASK in the catalog activity in the WF.
Thanks.