How to set the Due date of RITM and Task same as variable selected in Service Catalog

Naresh_5120
Tera Contributor

Hi Community,

 

I have created a termination form in Service Catalog item , when a termination form is filled by users, there is filed called Effective date (variable is name effective_date) select for the actual termination date. I want to show the same date as RITM Due date and Task due date, however it is not happening currently.

 

Can someone suggestion how can I achieve the output.

 

Effective Date Selected is - 

Naresh9_0-1674622412470.png

 

RITM Date is showing is

Naresh9_1-1674622448607.png

 

Task Due date is showing is

Naresh9_2-1674622489183.png

 @Ankur Bawiskar I saw your other post where you have provided solution but that thread is closed, therefore tagging here for help!

11 REPLIES 11

Shekhar Navhak1
Kilo Sage
Kilo Sage

Write script after begin activity in workflow as shown below:

 

 

var gtd=new GlideDateTime();
grd.setValue(current.variables.effective_date);
current.due_date = gdt.getDate().getDisplayValue();

 

Please mark the answer correct/helpful based on Impact.
Regards, Shekhar

Hi Shekhar,

 

Thank you, i have tried script suggested by but still i am not able to display the Due date as Effective date. Due date on task is showing 1 day behind the the actual date of effective date. Refer the screenshot.

 

Naresh9_0-1674816377965.png

 

Hi @Naresh_5120 ,

 

Step 1. Can you try to put a log in workflow

Step 2. Can you check with different users, if it is different then we have to use time zone functions to populate the date

 

 

Please mark the answer correct/helpful based on Impact.
Regards, Shekhar

Hi Shekhar,

 

with script given by you i am able to populate date only on RITM Due date not in Catalog task Due date.