How to ensure the Estimated Completion date is filled in by an assignee

rjp
Tera Expert

Hi Folks,

I'm very new to ServiceNow, in fact this is my first discussion.   We are trying to find the best way to ensure that the Estimated Completion Date (RITM level) will be completed.   What is the best way to have the person who is assigned the task fill out the Estimated Completion Date.   At first thought we would send a notification to the assigned to person, but if anyone has a different approach or a suggested solution for a similar problem I'd love to hear it.  

Thanks in advance for any advice.

rjb

1 ACCEPTED SOLUTION

Hi Rob,



Glad to help you!! I am working with ServiceNow Platform for past 4 years



In Response to your Second Question, I don't think there is a way to restrict it . Business Rule will Run on both the ITSM as well as Self Service Portal View. I think regarding the process which you have designed, it needs some User training educating them on how to use this feature in ServiceNow rather than restricting it based on views.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

17 REPLIES 17

Hi Shloke,


Thank you again for sharing your knowledge.   Assuming the user now gets an error when updating the task, what is the best/easiest way for them to get back to the RITM to update the date?   Do they have to discard everything and go back and update the RITM?


Thank you,


Rob



find_real_file.png


HI,



Nope what you can do, there is already a field named "Request Item" on the Catalog task form as shown below. So users can simply click on Info Icon next to Request Item field and get Redirected to the Parent Requested Item form to Update the Required field.



find_real_file.png



Or the other way would be to form a Link in your Business Rule itself. Please update the Script as mentioned below to form an URl and get it displayed in th header of the Catalog Task form when Invalid Update message gets displayed:



Script:



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



  // Add your code here


  var item = new GlideRecord('sc_req_item');


  item.get(current.request_item);


  if(item.estimated_delivery=='')


  {



  current.setAbortAction(true);


  gs.addInfoMessage('Please Select the Estimated Delivery Date before continuing with Catalog Task');


  gs.addInfoMessage('Parent Requested Item <a href ="/sc_req_item.do?sysparm_query=number%3D' + item.number + '">'+ item.number +'</a>'+ 'has been created.');


  }





})(current, previous);



find_real_file.png



find_real_file.png



Result:



find_real_file.png



Hope this helps.Mark the answer as correct/helpful based on impact.




Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Thank you again Shloke for sharing your knowledge, its very helpful and appreciated.


Is it possible to have this function run only if the user logged in is of itil_user role?


Our concern is that non-roled consumers will get this error message and not know what a RITM is or how to update it.


Limiting this function to itil users and above may be a way to avoid this confusion, unless you know of a better solution.



Thank you,


Rob


Yes, it's very much possible. Please update your script as below to achieve the validation you want:



Script:



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



  // Add your code here


  var logged_user = gs.getUser().hasRole('admin');


  if(logged_user)


  {


  var item = new GlideRecord('sc_req_item');


  item.get(current.request_item);


  if(item.estimated_delivery=='')


  {



  current.setAbortAction(true);


  gs.addInfoMessage('Please Select the Estimated Delivery Date before continuing with Catalog Task');


  gs.addInfoMessage('Parent Requested Item <a href ="/sc_req_item.do?sysparm_query=number%3D' + item.number + '">'+ item.number +'</a>'+ 'has been created.');


  }


  }





})(current, previous);




find_real_file.png



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi Shloke,



That worked great, it was much easier than the way I was attempting.   I didn't realize there was the .hasRole function.


Thank you again for sharing your vast knowledge, by the way how long have you been working with ServiceNow?



Thanks again,


Rob