Advanced Reference Qualifier: Company is active user's Company

stevejarman
Giga Guru

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?

13 REPLIES 13

Or did you mean company.sys_id= ?


That DOES work - i.e. if you specify company.sys_id:



javascript:"company.sys_id=" +gs.getUser().getCompanyID();



Interesting.


Good call... I looked too quickly at what he had and didn't think through what he was doing.   😉



-Brian


GoBucks
Mega Sage

Steve, have you tried this?



company=javascript:gs.getUser().getCompanyID()



-Jeff



PS - Please mark accordingly (correct / helpful / like)