How to auto-populate the user Company and Cost center code in the "x" variable of catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2024 08:09 AM - edited 07-13-2024 08:10 AM
Hi All,
I want to auto-populate the Company and Cost center code of the "requested for" user without writing client script/ UI policies. I want update on the variable level. I tried by providing the default value as "javascript:gs.getUser().getCompanyID();". But, I'm just getting the SysID of the Company. Tried by giving alternative value as well, like CompanyName.. but not working
Can anybody please help me to get the correct value of the Company and cost center code together. As I don't have idea, which backend value to be provided under "Default"
Example., Netherland - NL
Thanks in Advance!
Regards,
Kruthika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 01:50 AM
Thankyou for the solution Deepak Shaerma.
The above Code is working to display the Company Name of the Requested For User. By just copy pasting it in the Default Value Field of the Variable.