onChange catolog client script is not working on RITM form

mdsannavulla
Kilo Guru

Hi All,

I have written below script to auto populate one field, "onChange" of another field. It is working fine on catalog form but it is not working on RITM form.

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

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

          return;

    }

  var val = g_form.getReference('user',pop);

  function pop(val)

  {

  alert("inside fun");

  g_form.setValue('region',val.email);

  }

   

}

Please try this and let me know if you have any solution for this

1 ACCEPTED SOLUTION

mdsannavulla
Kilo Guru

I raised a ticket for this issue in HI instance and they provided the solution like below



if (typeof g_sc_form != "undefined")


var val = g_sc_form.getReference('user',pop);


else


  var val = g_form.getReference('user',pop);



I tried this and it is working perfectly....


View solution in original post

17 REPLIES 17

If it still isn't running with all CS and UI Policies 'inactive'; then the onChange is NOT evaluating.   What release are you on?


Eureka patch 10


mdsannavulla
Kilo Guru

I raised a ticket for this issue in HI instance and they provided the solution like below



if (typeof g_sc_form != "undefined")


var val = g_sc_form.getReference('user',pop);


else


  var val = g_form.getReference('user',pop);



I tried this and it is working perfectly....