Creating record from Client callable Script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks 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
3 weeks 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
3 weeks 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
3 weeks 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
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 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
