Issue
Pop up /Message saying that the object is undefined.
Cause
In javascript, the object was set to null as the method returned null.
Resolution
Include an if statement to check if the object is not null and then use the object properties, for example:
var priority = gr. getreference("incident_prioirty")
if (prioirity)
{
// do something with the priority
}