- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 10:05 PM - edited 03-06-2025 10:06 PM
Hello!
I have a requirement to populate the timezone field in the Users table from the timezone field in the Location table.
However, the client does not use the Location reference field in the Users table. They created a text field and want to use this. I've created a before BR but does not work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 10:16 PM - edited 03-06-2025 10:19 PM
Hi @ramirch
Add update(); in your script if that not works, verify with below updated script:
var gr = new GlideRecord('cmn_location');
gr.query();
while (gr.next()) {
if (current.u_location == gr.full_name) {
current.time_zone = gr.time_zone;
current.setWorkflow(false);
current.update();
current.setWorkflow(true);
break;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2025 11:33 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 01:23 AM
Thank you for marking my response as helpful.
As per new community feature you can mark multiple responses as correct.
If my response helped please mark it correct as well so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 08:14 AM
Thank you for marking my response as helpful.
As per new community feature you can mark multiple responses as correct.
If my response helped please mark it correct as well so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader