29 views

Symptoms


getGlideObject giving error "Fault Description: TypeError: Cannot convert null to an object. (#0(eval); line 18) " post upgrade to London

Release


Seen in London

Cause


getGlideObject is not a  correct class to use. getGlideObject is an internal class - it is not supported class to be used. It is an undocumented class.

The reason why it worked in pre-London: in London, Variable Sets have been elevated to be a first class citizen in Service Catalog, which means that variable set is now accessible via script. 

Resolution


You dont have to use getGlideObject and can access the variables directly.

To resolve the behavior faced, please utilize a Script like the following:

if (gr.description == '')
{
var variables = current.variables.getElements();
for(var i=0;i<variables.length;i++)
{
var v = variables[i].getQuestion();
gr.description += v.getLabel() + " - " + v.getValue() + "\n";
}
}
gr.update();

 

Article Information

Last Updated:2018-10-10 03:26:26
Published:2018-10-10