Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2022 07:03 AM
Hi,
you can query sys_user table with the field against which the value is entered
what does the position manager show? user_name or name of the user?
Based on that you can query and get the sys_id
For example I am querying with name field
if (gs.getUser().isMemberOf("f65370019f22120047a2d126c42e705c")) {
var gr = new GlideRecord("sys_user");
gr.addQuery("name", producer.employee_details_position_manager);
gr.query();
if (gr.next()) {
current.opened_for = gr.getUniqueValue();
}
}
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
Regards
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader