- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2020 11:12 AM
In the holiday calendar cmn_schedule_span table there is a field "All Day" which is boolean. I am trying to update it from transform map as well as background script but unable to . Request you to please let me know if i am doing something wrong here
var gr = new GlideRecord('cmn_schedule_span');
gr.addEncodedQuery('sys_created_by=xxxxx');
gr.query();
while (gr.next()) {
gr.all_day=true;
//gr.type='exclude';
//gr.show_as='busy';
gr.update();
gs.print("Opened By==" + gr.all_day);
//gr.deleteMultiple();
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2020 09:40 PM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2020 11:13 PM
Hi
Instead of setting the value to 'true' or 'false' can you use 0 for false and 1 for true.
var gr = new GlideRecord('cmn_schedule_span');
gr.addEncodedQuery('sys_created_by=xxxxx');
gr.query();
while (gr.next()) {
gr.all_day=1; // 1 for true and 0 for false
gr.update();
}
Thanks,
Sravya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2020 09:40 PM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2020 11:23 PM
Thanks Mark. It did help me to resolve the issue