Default value for a variable in Service Catalog variable set from User table

G Balaji
Kilo Guru

Hi,

I have two variable in a service catalog variable set which has to display user's phone number and department on loading catalog item. I need to set the default value. How do I do it?

 

Thanks,

G Balaji

13 REPLIES 13

Not applicable

Hi Balaji,

Write below code in your default value :

javascript:gs.getUser().getRecord().getValue("mobile_phone");

 

Thankyou 

Ajay

find_real_file.png

Hi Ajay,

Thanks for the response. I need to get the value of Business phone field. I could get the value of Mobile Number field, but not business phone.

Regards,

G Balaji 

If you want business phone number field just type

 

javascript:gs.getUser().getRecord().getValue("business_phone");

 it wil definetly help you....

please mark it correct.

 

TK Wickz1
Tera Contributor

Hi Ajay,

This code worked. Thank you.

If you want a currently logged in user phone number on incident form. Simple type in " on change " client script var phone=g_form.getrefrenece("caller_id).phone; here caller_id is the feild name on the change of value of that feild,that client script will execute. and .phone is the feild name of user table where actually the number of selected caller is stored.