Active=true in Reference Qualifier

Kri
Tera Guru

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

Krishna124_0-1683010989169.png

 

15 REPLIES 15

This script didn't works

What's the output/error it is giving.

Can you share the screenshots of script include method and your reference qualifier

it is showing all the records

Krishna124_0-1683099288116.png



Krishna124_1-1683099309480.png

 

Krishna124_2-1683099341697.png

 

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;
}

 

 

it is not working, can we get into a call?