Sript

Rosy14
Tera Guru

I have list of sys_ids. I want to get the name of corresponding sys_ids in a list

var bData=fd_data.trigger.current.u_select_buying_agent_account;
var bDataL=bData.split(',');
var nameL=[], email=[],i=0;
var gr ;
//= new GlideRecord('customer_contact');
//gr.addEncodedQuery("companyLIKEcasa^ORcompanyLIKEli & Fung");
//gr.query();
for(i=0;i<bDataL.lenght;i++)
{
    gr = new GlideRecord('customer_contact');
    gr.query('sys_id',bDataL[i].toString());
    gr.query();
    nameL[i] = gr.getDisplayName('first_name')+' '+gr.getDisplayName('last_name');
    email[i] = gr.getDisplayName('email');
   
}

return nameL;
 
Not working

Please help.

7 REPLIES 7

Can you show the script? I want to check if you used the changes I made or not?

-Anurag

Why multiple questions for same thing?

Hope you get the help but i cant keep up.

-Anurag