servicenow reference field empty in list view but showing on record

irfanhabeeb
Tera Contributor

I have a custom created table u_cmdb_ci_api_partner which is a child of cmdb_ci table . And a 'u_partner_name' field referencing core_company table . Also there is before insert & update BR to populate partner app name from partner name field . 

 

BR 

(function executeRule(current, previous /*null when async*/) {

    if (current.u_partner_name || current.u_api_master) {

        // Get Partner App Name from Company
        if (current.u_partner_name) {
            var company = new GlideRecord('core_company');
            if (company.get(current.u_partner_name)) {
                gs.log("partner name"+current.u_partner_name);
                current.u_partner_app_name = company.u_partner_app_name;
            }
        }

        // Set Name field
        current.name = current.u_partner_name.getDisplayValue() + " " +
                       current.u_api_master.getDisplayValue();
    }

})(current, previous);
 

To check the Br when i tried to edit partner name  from list it is not saving and showing as empty. when go to the certain record and explictly save a value it is hsown on the record form and value(partner app name ) is getting populated. Still in the list view partner name is empty .

 



Action Result
Formshows value
Savelooks saved
List viewempty
List editclears value
1 ACCEPTED SOLUTION

irfanhabeeb
Tera Contributor

The issue was fixed , it was due to a simple error , same field label , but one was dot walked field from another table , And the wrong one was in the default list view 🙂.

Thank you for your help @Ankur Bawiskar @Tanushree Maiti .

View solution in original post

14 REPLIES 14

hi @irfanhabeeb 

 

did you refresh your page after enable the sys_properties it is true/false field . value you need to set as true.

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Yes I did and also logged out & in .

Hi @irfanhabeeb 

 

Which version you are checking. I did check in Zurich PDI and its working!

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

I am at yokohoma.

Ankur Bawiskar
Tera Patron

@irfanhabeeb 

are you testing the list functionality in native or workspace?

share some screenshots

Did you add log in your BR and see if it's getting triggered when you set field from List?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader