Shalaka
Tera Contributor

function onLoad() {

//var tes = g_form.getDisplayValue('parent_incident') ; //reference field
var tes = g_form.getDisplayBox('parent_incident').value;
//alert(tes);
var test2=g_form.getValue('u_parent_incident'); //

if(test2== ' ' )

{

g_form.setDisplayValue('u_parent_incident',tes);

}

}

 

When you use g_form.getValue for reference fields, it will provide a sys_id of the record.

You can use g_form.getDisplayValue('fieldname').value function or else use scratchpad(using display business rule).

 

Thanks,

Shalaka