Set Due Date to blank

kevwatson
Giga Contributor

Is there a way to set the due date to blank when specific Catalog Items a requested? I have a Catalog Item that's for internal IT use and doesn't have any workflow associated with it, however when this Catalog Item is raised it's defaulting the Due Date to the date and time the request was raised.

1 ACCEPTED SOLUTION

amaradiswamy
Kilo Sage

Hi,

Did you try by making below changes?

 

1.In when to run set insert and update check box to true

  change order to 12000

2. In advanced section you are using g_form which is a client side API method wich will not work in server side. Try with below as already mentioned by Jaspal

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	current.due_date='';
	current.update();

})(current, previous);

View solution in original post

16 REPLIES 16

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

this thread might help you to achieve that:

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

If I have answered your question, please mark my response as correct and/or helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

You can have before insert business rule that runs on RITM table with condition as

Item is Your_Catalog_item name for which it should work.

& in Advance tab add script as below.

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	current.due_date='';
	current.update();

})(current, previous);

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

kevwatson
Giga Contributor

I've created the attached Business Rule but it's not working, any ideas?

 

Try to set the business rule as After with an high order (i.e. put 100000).