Request Item Due Date and SC Task Due Date

GB14
Kilo Patron

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.

 

 

 

1 ACCEPTED SOLUTION

Manmohan K
Tera Sage

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

View solution in original post

5 REPLIES 5

GB14
Kilo Patron

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.