8 Replies · Latest reply on Dec 4, 2017 7:29 AM by Naresh Reddy

    Based on the variable value approvals need to trigger in workflow?

      We have a Service Catalog (Leaver) ,In catalog i have user reference type variable(Leaver name) using leaver table( leaver Name and Approval group.

       

      Whenever user select Leaver name, based on the leaver name Approval group need to trigger in workflow.

       

      I have wrote the below script, Its not working. Please suggest me any one .

       

      answer = [];

      var Source = new GlideRecord('u_leaver_request');

      Source.addQuery('u_leaver_s_name',current.variables.leaver_name);

      Source.query();

      if(Source.next())

      {

      answer.push(Source.u_approval_group);

       

       

      }