CSM/FSM workspace client script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2023 12:49 AM
Hi all,
I have client script that works fine in the backend view, but in worksapce it kicked the client script but didn't enter the glide record
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var group = g_form.getValue("assignment_group");
// if(group != ""){
// g_form.setMandatory('work_notes', true);
// }
var flag = false;
var gr = new GlideRecord("sys_user_group");
gr.addQuery("sys_id", group);
gr.query();
if (gr.next()) {
if(gr.u_tier == 1){
flag = false;
} else if(gr.u_tier == 2){
flag = true;
} else if(gr.u_tier == 3){
flag = true;
}
}
g_form.setMandatory('service_offering', flag);
//Type appropriate comment here, and begin script below
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2023 02:26 AM
Hi,
Please do not use GlideRecord in client scripts
Best practice is to use GlideAjax in client script