deepthij
ServiceNow Employee
ServiceNow Employee

Issue: In Madrid when assigning the variable to null can cause java.lang.NullPointerException and this can also result in variables not displayed on lists/reports.

Steps to Confirm: Please run the below script in background to confirm whether the issue exists in Madrid or not:

1) Login to your instance as "Admin"
2) Run the following background script:
var gr = new GlideRecord("sc_req_item");
gr.addQuery("number","<put the number of the Requested item>");
gr.query();
gr.next();
gr.variables.<put the name of the variable here> = null;
gr.update();
3) Exception is encountered.

Resolution: There is a Know error article for the issue. Please find the KE article here - KB0748703

Workaround: Find the requested item that has the issue and identify variable that is set as null. Then run the below script in background.

var gr = new GlideRecord("sc_req_item");
gr.addQuery("number","<Put the requested item number here>");
gr.query();
gr.next();
gr.variables.<put the name of the variable> = '';
gr.update();

Note: You should test in sub prod first (make sure sub prod is a recent clone of PROD or clone your prod to a sub prod environment) to confirm and then apply the changes in PROD.