Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

GlideList not editable after writing code in calculated field

sanasayyad
Tera Contributor

This code is working properly , i want to ask an alternative i.e  after writing script is there any possible way to edit the Glidelist ?


(function calculatedFieldValue(current) {

    var userList = [];

 

   var id = current.sys_id;

   

    var gr = new GlideRecord('sn_install_base_sold_product_related_party');

    gr.addEncodedQuery('sold_product=' +id);

    gr.query();

 

    while (gr.next()) {

       

        if (gr.contact) {

            userList.push(gr.contact.getDisplayValue());

        }

    }

 

    return userList.join(',');

})(current);

1 REPLY 1

Mark Manders
Giga Patron

You could just make it a before insert BR to fill it by default so you can change it after it is initially set. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark