- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2025 12:40 PM
I have a need to have an alert popup on an incident record should the called be a "full Service Customer". Our helpdesk services both internal "Full Service" and external "Non-Full Service" customers. I was wondering how do I go about doing this. we determine if a customer is internal or external from a field on the incident record form. Any help would be much apricated in this issue. Thank you in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2025 09:58 PM
Hi @ccurtis ,No worries. So you have to create an onChange client script on incident table with field change - 'Caller' .Then this script- adjust the script with your variable internal names
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var caller = g_form.getReference('caller_id');
var userType = caller.u_usertype;
if(userType == 'internal'){
g_form.addInfoMessage("Full Service");
}
else if(userType == 'external'){
g_form.addInfoMessage("Non-Full Service");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2025 10:39 PM
Hi @ccurtis , Do you have something in the user record that determines if the customer is internal/external? If there is, you can dot walk from the 'Caller' field and alert the message using client script. If you provide some more information, I can provide help with the script if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2025 08:59 AM
Yes, thank you sorry for the late reply, We do have a field on the User form that indicates if a user is internal or external to ServiceNow. In addition to that field, we also have a group that all internal users are apart of. Thank you for the assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2025 09:58 PM
Hi @ccurtis ,No worries. So you have to create an onChange client script on incident table with field change - 'Caller' .Then this script- adjust the script with your variable internal names
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var caller = g_form.getReference('caller_id');
var userType = caller.u_usertype;
if(userType == 'internal'){
g_form.addInfoMessage("Full Service");
}
else if(userType == 'external'){
g_form.addInfoMessage("Non-Full Service");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2025 02:23 PM
You should check the "Explicit roles plugin" if it's not installed yet.
Then, the respective roles have to be always distributed.
And finally, in onLoad/onChange client script you can have the following validation: