The CreatorCon Call for Content is officially open! Get started here.

Need to auto create schedule entry based on sc_task

prasadr
Giga Contributor

Hi All, 

 

I have a requirement below,

 

If a Sc_task Shortdescription is "XYZ"  and updated the sc_task record then need to create a new schedule entry in 'Heavy Roll' schedule.

 

I have created Business Rule on Sc_task table

condition: After --> Update ---> Short description is "XYZ" 

 

Script:

var gr = new GlideRecord("cmn_schedule_span");
  gr.initialize();
gr.name = 'Heavy roll2';
gr.schedule = 'Heavy Roll';
  gr.insert();
 
I'm not sure this is not creating any record in schedule entry table.
 
can any one help me on this.
 
Thanks, 
Prasad.
1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @prasadr 

 

Better to use the flow designer, easy and low code.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************