Filter contacts based on customer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 02:09 AM
I have a requirement where i need to filter the contacts based on customer.
my two fields on the table are customer,contact
customer is refrenced to account table
and contact is refrence to customer_contact table.
i tried writing a script include but it is not fetching me the results:
var getContactCustomer = Class.create();
getContactCustomer.prototype = {
initialize: function() {
},
getContact : function()
{
var contact = new GlideRecord('customer_contact');
contact.addQuery('sys_id','account');
contact.query();
if(contact.next())
{
return "account"+"="+contact.customer.toString();
}
},
type: 'getContactCustomer'
};
i used the script include on the variable contact :javascript : new getContact().getContact()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 02:42 AM
Hi @anayna
Can you share the screenshot of your Reference Qualifier?
Also by any change is this due to active field?
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 02:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2022 09:22 AM
Hi @anayna
Have you verified that the record were showing before Reference Qualifier, which is not showing after filter.
There may be some access related restriction from Query Business rule or ACL. Please verify once.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023