Creating record from Client callable Script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I won't recommend this approach and not convinced why this is required.
Clicking on left nav module creates record -> Not a good practice
Those schedule records should be created by admin using UI
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
@Ankur Bawiskar
We are creating the Schedule using the logged in user's timezone. So the function automatically creates the schedule. If not from the argument of the Module.
I can go with the a new UI action to create it. But I want to mask the New UI action that is for the Global table. But If i contol the visibility, it applies on all the tables. So i don't want to touch the GLobal New UI action.
If I override it with a different new UI action, and set the visibility to users with XYZ role, it appears for XYZ role usrs and there will be no UI action for other Users. Can you pelase suggest how to best approach this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
-> I’m still not convinced why selecting a left‑navigation module should automatically create entries in the schedule table.
-> A better approach would be for an admin to create schedules manually, based on the unique time zones associated with the sys_user records.
-> Please inform your architect or technical lead that the current approach is not recommended. Even customers are unlikely to agree to this, and if they do, it’s still our responsibility to guide them toward best practices.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
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]
****************************************************************************************************************
