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

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

@Manmohan K 

For some reason, I cannot stop the approval for some reason. The below is my BR. Am I missing anything?

 

GB14_0-1684416292658.png

GB14_1-1684416319943.png

 

I just fixed the above approval part. working on step # 2

@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