- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2021 05:38 AM
On incident form: when user with VIP = true is selected as caller in the incident, then addFielMessage to Caller field saying “This user is VIP”. Remove the message if Caller is changed then to empty or not VIP
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2021 06:26 AM
update as this and check once
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.hideFieldMsg('caller_id');
//Type appropriate comment here, and begin script below
g_form.getReference('caller_id', function(gr) {
if (gr.vip.toString() == 'true') {
g_form.showFieldMsg('caller_id', 'caller is VIP', 'info');
}
});
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2021 05:47 AM
you can create onLoad client script and if caller is VIP you can write script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2021 06:26 AM
update as this and check once
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.hideFieldMsg('caller_id');
//Type appropriate comment here, and begin script below
g_form.getReference('caller_id', function(gr) {
if (gr.vip.toString() == 'true') {
g_form.showFieldMsg('caller_id', 'caller is VIP', 'info');
}
});
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader