Reference qualifier on the record producer

Kaustubh k
Tera Contributor

Hi All,

 

Thanks for checking my post.

We have reference qualifier in the incident form on a custom field  service  as :

javascript:new incidentServerUtils().getService(current.caller_id);

 

which triggers;

var incidentServerUtils = Class.create();
incidentServerUtils.prototype = {
    getService: function(cur) {
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id',cur);
gr.query();
if(gr.next()){
var assigneeLoc = gr.location.country;
}
return 'u_location='+assigneeLoc+'^ORu_location=';
    },
    type: 'incidentServerUtils'
};
 
Now when i am trying to use the same in Record producer filed which has variable service, its not taking up the further flow and not triggering the logic in Script include.
 
looking forward for a feedback on this.
 
Thanks
Karan
 
 
1 ACCEPTED SOLUTION

Pravindra1
Tera Guru

Hi @Kaustubh k ,  To get the field value in Record producer, need to use variables.<Field/Variable Name>.

 In your use case, It should work when you replace the "current.caller_id" to "current.variables.caller_id" in reference qualifier.

javascript&colon;new incidentServerUtils().getService(current.variables.caller_id);

 

View solution in original post

5 REPLIES 5

Pravindra1
Tera Guru

Hi @Kaustubh k ,  To get the field value in Record producer, need to use variables.<Field/Variable Name>.

 In your use case, It should work when you replace the "current.caller_id" to "current.variables.caller_id" in reference qualifier.

javascript&colon;new incidentServerUtils().getService(current.variables.caller_id);