Auto populate service catalog variable with requesters information

karthiknagaramu
Kilo Sage

Hi,

I have a catalog item in which there are variable like Requster Department, Requester Manager all are single line text type. When requester selects the catalog item from service catalog these variable has to be auto populated from user record. What is the best way to implement it. I was able to populate the requester's email by providing javascript:gs.getUser().email; in default value.

But the same thing not working for department or manager field, I believe this could be because these values are not available at client side.

Regards,

Karthik Nagaramu

1 ACCEPTED SOLUTION

Kyryl Petruk1
Tera Expert

Long story short you can make this:


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


javascript:gs.getUser().getRecord().getDisplayValue("department");


View solution in original post

8 REPLIES 8

Kyryl Petruk1
Tera Expert

Long story short you can make this:


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


javascript:gs.getUser().getRecord().getDisplayValue("department");


Hi Kyryl



Thankyou



I found your answer helpful..



can you please help me to find the manage name also of current user ..?


Hi Sandeep,



If you need to get a name of the user's manager, you just use the name of the field you want in the script:


javascript:gs.getUser().getRecord().getDisplayValue("manager");



Hope this helps!


Tried Getting Mobile Phone(having field type phone number) it's returning null values.

Other than Mobile Phone... it's returning all the values.