- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 08:25 AM
We have a custom table "u_extended_user_profile" which reference sys_user table using custom field "u_user". Two fields on our custom tables are: u_alternate_email_1 and u_alternate_email_1.
On a record producer, we would like to auto populate two variables with u_alternate_email_1 and u_alternate_email_1 using default value.
javascript:gs.getUser().getRecord().getValue("u_alternate_email_1"); is not working.
How do we dot walk and find u_alternate_email_1 for logged in user?
Solved! Go to Solution.
- Labels:
-
Instance Configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 12:38 PM
Hi MS - You can populate this via Client script + GlideAjax approach.
https://community.servicenow.com/community?id=community_blog&sys_id=f8ccee25dbd0dbc01dcaf3231f961978

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 12:38 PM
Hi MS - You can populate this via Client script + GlideAjax approach.
https://community.servicenow.com/community?id=community_blog&sys_id=f8ccee25dbd0dbc01dcaf3231f961978

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 12:49 PM
As suggested by Pradeep, you can call a script include and use it
Or you can try below script
javascript:var u = new GlideRecord('sys_user');u.get(gs.getUserID());u.getValue("u_alternate_email_1");
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:08 AM
Thanks, this worked for me, but can you explain why
gs.getUserID().getDepartmentID(); doesn't work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:07 AM
Thanks, this worked for me, but can you explain why
gs.getUserID().getDepartmentID(); doesn't work?