Advanced reference qualifier for record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 01:47 AM
I created a system property and script include to use as a reference qualifier, it is working on the platform side but when I use the same reference qualifier for the record producer as an advanced reference qualifier it doesn't work.
This is the reference qualifier am using for the record producer to fetch it from the script include:
javascript:new reference_qualifier().company_code();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 01:51 AM
Check the below to debug your code
https://community.servicenow.com/community?id=community_question&sys_id=9561d72ddbdcdbc01dcaf3231f961990
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 07:01 AM
Hi,
are you sure the script include is getting called fine and returning the correct query?
Is that table being referred by variable having u_company_code field?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 07:33 AM
Hi
Yes, the script include is working fine and fetching only the list of companies with the company code given in the system property values it just isn't getting the right values on the record producer side.
The u_company_code field is a custom company table field that I created, the record producer has a field/variable called company which is a reference type with the company as a reference here is where I want to add the reference qualifier.
javascript:new reference_qualifier().company_code();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 08:13 AM
Hi,
so you are saying it fetches valid list of companies but it is not setting the right values?
what does this mean?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 12:27 AM
Yes it's fetching the right values given in the system property and passing them to the reference qualifier and getting the correct list of companies based on the company code from the system property on the platform side or on the main ServiceNow window but this same reference qualifier is not working when used as an advanced reference qualifier for the company reference variable on the record producer.