Advanced Reference Qualifier: Company is active user's Company

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 06:16 PM
Hi - I have a table with a field called "company" that is a reference to Company. I'm trying to apply an advanced reference qualifier that will filter that table for records matching the current user's company. I just can't get it to work though - I get no results.
My reference qualifier is:
javascript:"company=" +gs.getUser().getCompanyID();
If I run this portion in a background script:
gs.log(gs.getUser().getCompanyID());
I get the expected sys_id.
I've also tried:
javascript:"company=" +gs.getUser().getCompanyRecord().sys_id;
What am I doing wrong?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 08:42 PM
Or did you mean company.sys_id= ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 09:29 PM
That DOES work - i.e. if you specify company.sys_id:
javascript:"company.sys_id=" +gs.getUser().getCompanyID();
Interesting.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 11:18 PM
Good call... I looked too quickly at what he had and didn't think through what he was doing. 😉
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2016 10:10 AM
Steve, have you tried this?
company=javascript:gs.getUser().getCompanyID()
-Jeff
PS - Please mark accordingly (correct / helpful / like)