How to add due date 7 days after the current date on RITM

Jyoti Gaikwad1
Kilo Contributor

how to populate due date value in "Due date " field which would be 7 days after opened date (current date and time).

time should also populate as per JST 17:30 in due date field .

 

Please help .

Thanks in advance.

5 REPLIES 5

Chetan Mahajan
Kilo Sage
Kilo Sage

Hi Jyoti,

                     are you using JST time zone for opened date also? Go through below thread to populate due date based on open date.

https://community.servicenow.com/community?id=community_question&sys_id=96907cf8db4041d0382a82630596...

 

Kindly mark correct and helpful if applicable

yes

 

dmathur09
Kilo Sage
Kilo Sage

Hi Jyoti,

You can update the due date in the workflow itself. In the workflow properties under schedule tab. Refer below screenshot where you can update the expected time which is the due date on the RITM. 

find_real_file.png

Regards,

Deepankar Mathur

Aniket Sawant2
Giga Guru

Hi,

create a business rule on RITM 

when to run : before insert

 

var opened = current.opened_at;
gs.log("Opened =====" + opened);

var sd = new GlideDateTime(opened);
sd.addDaysLocalTime(7);
var test = sd.toString();
gs.log(test);
current.setValue('u_due_date', test);

 

 

 

or add below line to  Dictionary Entry Default value (Configure Dictionary ->default value)for due_date field

javascript: var d = new GlideDateTime(); d.addDaysLocalTime(7); d.getDisplayValue();

Please mark correct / helpful based on an impact.

Regards,

Aniket Sawant.