- 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:52 AM
try this:
javascript:gs.getUser().getCompanyID()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 05:22 AM
Thanks again Rajesh but still no luck - I think I may need to start debugging??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 07:37 AM
Hi Rajesh,
apologies but your suggestion did actually work ok - it was a group restriction on the ACL that affected my test users.
Many thanks for your help and I will mark this as the correct answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 06:25 AM
javascript:gs.getUser().getCompanyID()
works in demo instances.
So, your problem could be regarding permissions to read the data.
Have a look to the ACLs in the [core_company] table or other possible restrictions in the variable, catalog item, etc. such as scripts changing the value of the variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2015 06:28 AM
Thanks Javier - it looks to be an ACL or Business Rule issue - I'm looking into that now