Autopopulate phone number field from phone user table to contact number incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2018 12:32 AM
Hi,
I had a requirement Autopopulate

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2018 12:38 AM
Hi Rani,
Use gs.getUser().getRecord().getValue("mobile_phone"); in your server side script.
This line of code gets the logged in user's mobile phone number.
Regards,
Ajay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2018 12:41 AM
Use script include query the user table and return the mobile phone and use the onload client script(Glid Ajax) to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2018 12:49 AM
Hi Rani,
Configure dictionary field and add following in default value; this would work in global scope.
gs.getUser().getRecord().getValue("mobile_phone")
if you are in custom scope then that won't work; set it via script include call from default value
javascript: new ScriptIncludeName().getPhone();
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
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
10-22-2018 04:01 AM
Hi Rani,
Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader