onchange client script to auto populate email id field when particular caller is selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2022 11:04 PM
How to write an onchange client script to auto populate email id field when particular caller is selected
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2022 11:08 PM
Hi
Check the below link it will help you
https://community.servicenow.com/community?id=community_question&sys_id=54e5949ddbcee7c05d782183ca961914
Thanks
Chandu Telu
Mark the answer if correct/helpful , if it helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2022 11:09 PM
Hi Ramya,
What method you tried till now as you will get hundreds of similar thread.? If you need no code solution and this is on Catalog item then follow below approach
https://community.servicenow.com/community?id=community_article&sys_id=49deac8ddb92a010ab0202d5ca961967
If it is on Incident form as it looks from 'Caller' field then follow below approach
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
var usr = g_form.getReference('caller_id', callBack);
}
function callBack(usr)
{
g_form.setValue('email', usr.email);
}
Regards,
Musab