Dot walk to CI class field

brianlan25
Kilo Patron

I'm doing a g_form.getReference on the cmdb_ci field in a client script for incidents.  I'm trying to dot walk to a specific filed that is part of a specific class.  The filed is only on this class and when I do ci.u_service_level I get undefined.  What do I need to add to be able to get that field thought a dot walk via script?  Or am I going to have to do a GlideRecord query?  Below is my script.

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue === '') {
		return;
	}
	//Type appropriate comment here, and begin script below
	g_form.getReference('cmdb_ci', function(ci){
		if (ci.sys_class_name == 'u_cmdb_ci_myclass'){
			alert(ci.u_service_level);
		}
	});
}