I am trying to get email address from user table using client script on my custom form. I created a reference field from the user but when I try to get the value I get the sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 11:14 AM
I am trying to get email address from user table using client script on my custom form. I created a reference field from the user but when I try to get the value I get the sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 11:49 AM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var refcc= g_form.getDisplayValue('cc');
g_form.setDisplayValue('email', refcc);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 11:55 AM
I dont think setDisplayValue() works on client side
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 12:06 PM
yes prateek is right setDisplayValue will not work on client side either u can use getReference() or setDisplaybox('field').value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 11:51 AM
It did not work. It picks up the user id instead of email address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 11:53 AM
What value is stored in CC in your form??
Please mark my response as correct and helpful if it helped solved your question.
-Thanks