How to Display List of Incidents as per User's Location using Business Rules
// Add your code here
var current_user = gs.getUserID();
var usr = new GlideRecord('sys_user');usr.addQuery('sys_id', current_user);usr.query();if (usr.next()) {current.addQuery('location=' + usr.location);}
})(current, previous);
If my video/content helped you in any way, please mark this video/content as BOOKMARK, SUBSCRIBE & HELPFUL
Best Regards,
Prashant Kumar (LearnIT)
YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant
Blog LearnIT: https://medium.com/@LearnITbyPrashant
Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/
ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635
https://www.servicenow.com/community/developer-blog/how-to-display-list-of-incidents-as-per-user-s-location-using/ba-p/2434382