Active=true in Reference Qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 12:03 AM
I want to add additional condition active=true in my existing script in the reference qualifier for the Variable 'Line Manager', I tried adding the below script but it is not working, Can you help me where I'm going wrong?
javascript: "company=" +current.variables.company^active=true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 03:09 PM
This script didn't works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 10:18 PM - edited 05-02-2023 10:18 PM
What's the output/error it is giving.
Can you share the screenshots of script include method and your reference qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 12:35 AM
it is showing all the records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 01:05 AM - edited 05-03-2023 01:06 AM
Write this in script include method, it should work.
function: getCustomerContacts(vCompany){
var arrSysIds = []; // array to store the records
var grCustomerContact = new GlideRecord('customer_contact');
grCustomerContact.addQuery('company',vCompany.toString());
grCustomerContact.addActiveQuery(); //queries only active record, you can write grCustomerContact.addQuery('active',true);
grCustomerContact.query();
while(grCustomerContact.next()){
arrSysIds.push(grCustomerContact.sys_id.toString());
}
var result = "companyIN"+arrSysIds.toString();
return result;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 01:40 AM
it is not working, can we get into a call?