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 06:24 PM
What is the field name on the reference table? Is it :company" or "u_company"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 07:20 PM
Hi Steve, are you talking about from a list view? Like if I clicked on Business Services in the left Nav then I should see the services associated with my company?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 08:11 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 08:26 PM
Try this: javascript:'sys_id=' + gs.getUser().getCompanyID()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2016 08:42 PM
That wouldn't work though - how would it know that I'm referring to the company field?