- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 03:43 AM
Hi,
I wonder if anyone can help with this problem.
We have a catalog item that includes a variable set which displays a 'requestor name' and the related 'requestors company'.
The 'requestor name' is evaluated correctly and displays on the item form with a default value of 'javascript: gs.getUserID()'.
However, the 'requestors company' is not evaluated using 'javascript: gs.getUser().getCompany()' when the form loads - this script uses the syntax recommended in several posts on the community.
Does anyone know why this could be - is it the ordering of the variables on the form?
I can spend some time on creating another client script to populate this field but I wanted to check why this is not working,
many thanks,
Keiron.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 04:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 04:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 05:20 AM
Thanks Kalai,
I've just tried this instead of having the code in the default value but still no luck.
Could this be affected by any ACL on the Company field?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 05:28 AM
Does the user record has the company field filled in ? what records are you getting on clicking the lens icon ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 05:29 AM
Also login to
url: demo023.service-now.com/login.do
username and password : admin
access service catalog > blackberry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 06:10 AM
Thanks again for taking the time to help Kalai.
I see that this works ok and that I am presented with the correct Company for the logged-in user.
There is obviously something wrong with the permissions (or domain separation issues ??) in our instance because I don't see anything when clicking on the spyglass icon for the Company field.
The only difference with my form is that it is intended to display the user name and the Company on load of the page as read-only fields.
It only appears to be the Company field that we are having the problem with so I'll look into this further.