Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Auto populate Valid date 365 days

Ricardo Sanche3
Tera Contributor

when a knowledge article is created, the valid to date is auto-populated to the current date + 364 days.

1 ACCEPTED SOLUTION

Saurabh Gupta
Kilo Patron

You can write a business rule to populate that.

 

//Sample code

var dt=new GlideDateTime();
dt.addDays(364);

current.valid_to=dt;
gs.info(dt)

Thanks and Regards,

Saurabh Gupta

View solution in original post

1 REPLY 1

Saurabh Gupta
Kilo Patron

You can write a business rule to populate that.

 

//Sample code

var dt=new GlideDateTime();
dt.addDays(364);

current.valid_to=dt;
gs.info(dt)

Thanks and Regards,

Saurabh Gupta