"Invalid Reference" error message on reference field

jagadeesh143
Tera Contributor

Hi,

We recently upgraded to jakarta patch 6, I have an issue with reference field.

Issue is we have a client script to populate Location based on change of Configuration item on Incident form, while changing the CI, location is getting populated correctly but with error message as "invalid reference". i found that reason behind that message is my reference field(Location) is placed on first in the form so while populating location value simultaneously cursor is moving to that field that's why I'm getting the error, I've seen by changing the placement of my field there is no error.

find_real_file.png

find_real_file.png

Please let me know if some one has any idea on this issue.

Thanks in advance,

Jagadeesh.

6 REPLIES 6

sunilsafare
Mega Guru

Hi Jagadeesh,



Can you paste the client script code here.


jagadeesh143
Tera Contributor

Hi Sunil,



Thanks for your reply, Please find the below screen shot for script.



find_real_file.png


Thanks,


Jagadeesh.


I have not found any error in my instance though i place the location column at the top. Try using below script



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


//if (isLoading || newValue == ''){


if(newValue == ''){


return;


}



g_form.getReference('cmdb_ci', ciCallBack);



function ciCallBack(ci){


if(ci){                                                     //*******************Just to make sure code execution continues if ci value is valid


var ciLocation = ci.location;


var ciCompany = ci.company;


g_form.setValue('location', ciLocation);


g_form.setValue('company', ciCompany);


}



}


}


Hi Sunil,



No luck, I've tried the script you suggested but still issue remains same.


I've tried in both istanbul and jakarta versions.



Thanks and Regards,


Jagadeesh.