The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Variable Sync from task to ritm

InnamuriH
Tera Contributor

Lets say, I have a variable called "TEST 1" in RITM and hidden but the same variable is also present in task and visible on the form.

Now I am trying to update the TEST 1 variable with dropdown as "yes" and saved the form. I am going back to the request item with out refreshing I am just clicking on save button directly

Later, I am refreshing my task record and I can see the changes for variable Test 1 is getting reverted, why the variable sync from task to ritm is not happening if the variables are hidden in ritm, I also observed this for all the catalog items

How can we fix the issue, can any one also help me how the variables are getting synced from ritm to task?

 

Thanks.

5 REPLIES 5

Hi Shashank, 

 

Thanks for your response, I am trying with before update business rule, 

(function executeRule(current, previous /*null when async*/) {
    gs.info("inhar**bleep**ha current"+current.variables.definizione_agenda);
    gs.info("inhar**bleep**ha previous"+previous.variables.definizione_agenda);
      if (current.variables.definizione_agenda !== previous.variables.definizione_agenda) {
        gs.info("inhar**bleep**ha current1"+current.variables.definizione_agenda);
    gs.info("inhar**bleep**ha previous1"+previous.variables.definizione_agenda);

        gs.info("inhar**bleep**ha BR");
       
        var ritm = new GlideRecord('sc_req_item');
        ritm.get(current.request_item);

        // Update the RITM variable
        ritm.variables.definizione_agenda = current.variables.definizione_agenda;
        ritm.update();
    }
})(current, previous);