Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

get Referenc was not working

ArunaTunga
Tera Contributor

am trying to alert logged in user name with get reference but it not working, am don't know why variable was greyed out even i have called it on function.

ArunaTunga_0-1771570242944.png

 

5 REPLIES 5

Tanushree Maiti
Kilo Patron

Hi @ArunaTunga ,

Can you try with this:

function onChange(control, oldValue, newValue, isLoading) {

if (isLoading || !newValue)
return;

g_form.getReference('caller_id', caller);

g_form.getReference('assigned_to', assigned);
}

function caller(user){
var x = user.name.toString();
alert(x);
}

 

function assigned(assign){
var y = assign.name.toString();
alert(y);
}

 

Best Practice: It is highly recommended to use GlideAjax instead of getReference for better performance and reliability

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: