- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 06:31 AM
Whenever caller is selected in incident form that caller email id should be displayed in short description and work notes fields.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 06:36 AM
you can use onChange client script on caller_id field and set the short description and work notes
sample script below
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.getReference('caller_id', function(caller) {
if (caller) {
var email = caller.email;
var shortDescription = g_form.getValue('short_description');
var workNotes = g_form.getValue('work_notes');
// Update Short Description
g_form.setValue('short_description', 'Caller Email: ' + email + ' - ' + shortDescription);
// Update Work Notes
g_form.setValue('work_notes', 'Caller Email: ' + email + '\n' + workNotes);
}
});
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 06:36 AM
you can use onChange client script on caller_id field and set the short description and work notes
sample script below
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.getReference('caller_id', function(caller) {
if (caller) {
var email = caller.email;
var shortDescription = g_form.getValue('short_description');
var workNotes = g_form.getValue('work_notes');
// Update Short Description
g_form.setValue('short_description', 'Caller Email: ' + email + ' - ' + shortDescription);
// Update Work Notes
g_form.setValue('work_notes', 'Caller Email: ' + email + '\n' + workNotes);
}
});
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 07:29 AM
Its worth asking why?
Why email in the short description of every single incident?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2024 07:32 AM
Hi @VedhR
What is the business use case for this? Adding a caller in the Short description did not add any value, where you already have the caller field on the incident form. You will increase technical debt.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************