Create task in case table using client script/ business rule.

Abhijit Das7
Tera Expert

Hi Everyone,

I have created template for case table. Whenever I use this template and create case , then automatically task should be created in case table (CSTASK0010003). Can anyone help me to guide write client script/ business rule to generate task.

Any reference regarding this .

 

Thanks in advance 

cc : @Ankur Bawiskar 

1 ACCEPTED SOLUTION

@Abhijit Das7 

in the parent field you should set the case sysId and not number

gr.parent = current.getUniqueValue();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

12 REPLIES 12

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

from where are you triggering case creation using template? there itself you can write the code.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar @Sai Kumar B 

Yes I am triggering template from case table. 

5555.JPG

 

Case template used :

 

3333.JPG

And BR , I am using to create task :

6666.JPG

4444.JPG

Thanks

@Abhijit Das7  So, what's happening?

@Abhijit Das7 

in the parent field you should set the case sysId and not number

gr.parent = current.getUniqueValue();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader