Service Catalog auto populate a phone number

itspezi1
Tera Guru

Hi Team,

How can populate the phone number of the logged in user in catalog? Which table must be specified as a reference for the catalog item (variable)?

what is best practice?

regards,

 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

Instead of referencing any table you can pass default value for the phone number variable as below

javascript: gs.getUser().getRecord().getValue('phone');

where phone is the Business phone from User table

 

View solution in original post

10 REPLIES 10

how can I fill the city field?

I changed the user to Abel.

Hi @itspezi 

 

Would be better if you open a separate thread for this & mark current as closed by marking appropriate answer as correct as the title is for phone numbers & future readers may possibly get confused with the question & its appropriate answer.

Anyways, city is a field on User table? or you want it to be pulled from Location table that is field on User table.

You can use g_form.getReference() approach for the same.

Tanushree Doiph
Mega Guru

Refer below link,

https://community.servicenow.com/community?id=community_question&sys_id=829a832ddb5cdbc01dcaf3231f961931

itspezi1
Tera Guru

Hi Team,

how can I fill the city field?

regards,