Need to call RITM Variable from a Client UI action

anurag92
Kilo Sage

Hi,

I am stuck in a tricky situation. I have a button on RITM form that opens a Service Catalog in a Dialog Window. I want variables in Window to be populated by variables of RITM.

UI Action is Client and has below code to get variables from RITM, but that does not work.

var z = current.variables.u_customer_name;

  var x = g_form.getValue('number');

var gr = new GlideRecord("sc_req_item");

gr.addQuery('number', y);

gr.query();

if (gr.next()) {

    y = gr.variables.u_customer_name;

}

z and y are returning Undefined values. Is there any other way to call RITM variables from UI action?

I did a lot of research on this, but couldn't find a solution.

The form looks like this:

find_real_file.png

1 ACCEPTED SOLUTION

I figured this out. It's not possible to call variables directly from client UI action, so I had to use a GlideAjax to get the variable values.


View solution in original post

5 REPLIES 5

Can you please provide the solution so others can see.

Thanks,

Chad