Autopopulate phone number field from phone user table to contact number incident table

rani4
Mega Contributor

Hi,

I had a requirement Autopopulate

  field  from  user table to  contact number incident table
 
Thanks,
rani.
4 REPLIES 4

Ajaykumar1
Tera Guru

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

 

Rakhesh
Kilo Guru

Use script include query the user table and return the mobile phone and use the onload client script(Glid Ajax) to achieve this.

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader