The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Trying to automatically create a Catalog Task when a RITM is created

prudhvig
Tera Expert

Hi,

I have developed a catalog item which when filled and submitted would create a Request and RITM under it. Along with this, I want a Catalog Task to be automatically created with a description "Default Task".

I am quite new to Servicenow and unable to find a way to solve this. Please help.

Thanks in advance.

1 ACCEPTED SOLUTION

Oh My Mistake.



Try this:



  1. var gr = new GlideRecord('sc_task');
  2. gr.initialize();
  3. gr.request_item = current.sys_id;
  4. gr.short_description = "Sample Description";
  5. gr.description = "Sample Description"
  6. gr.insert();

View solution in original post

18 REPLIES 18

Oh My Mistake.



Try this:



  1. var gr = new GlideRecord('sc_task');
  2. gr.initialize();
  3. gr.request_item = current.sys_id;
  4. gr.short_description = "Sample Description";
  5. gr.description = "Sample Description"
  6. gr.insert();

HI Ashutosh,



I did this and it is creating 4 Catalog Tasks. Why is it creating four catalog tasks? Please let me know.


Try using After Insert Business rule. Remove update checkbox.



Thank you,


Ashutosh


Perfect. It is working. Thank you.


Great Happy to help you.



Thank you,
Ashutosh