Creating record from Client callable Script include.

Bharath24
Tera Expert

I have a requirement. If the schedule is already existing then show all the schedule entries related to that scheudle. If not Create a schedule. 

This happens from the Argument of the Module

 

Bharath24_1-1769770586086.png

This function getSceheuleID, calles one more funciton that gets or creates a cmn_schedule. But this is not working as expected. The schedule is not getting created from here. But If I call the funciton from background script it works. 
If anyone can help me with this. It will be great.!

Thanks!
Bharth

5 REPLIES 5

Dr Atul G- LNG
Tera Patron

Hi @Bharath24 

We had a similar case in Change Management, but it wasn’t approved — even by SN. The reason is that a schedule requires human intervention; it’s not just a simple time slot. It includes fields like time zone, class, and other required attributes when creating it. A schedule must also have schedule entries. SN advised that rebuilding this same model would be heavy customization since it’s already available out of the box.

Because of that, we dropped the idea. So it’s not one-sided — if a schedule needs to be modified, it’s better to use the OOTB approach rather than decoupling the schedule and recreating it.

*************************************************************************************************************
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/dratulgrover [ Connect for 1-1 Session]

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