1 Reply · Latest reply on Jul 17, 2017 5:05 AM by Chuck Tomasi

    Change Management



      In the change record, I have to check that the impacted CI is available in related list of change form using workflow,if change form contains impacted CI then it should follow different approval process for this I used run script code to check impacted CI but there is some error and the process stops at that stage,Can anyone give me some solution


      this was the script which I have used:


      var workflow_scratchpad_impacted_cis;
      var impacted_cis = [];
      var gr = new GlideRecord('task_cmdb_ci_service');
      gr.addQuery('task', current);
      while (gr.next()){

      workflow_scratchpad_impacted_cis = impacted_cis;
      if(workflow_scratchpad_impacted_cis != '')
        return 'yes';
      return 'no';

        • Re: Change Management
          Chuck Tomasi

          Are you simply checking if the related list is empty or not? This seems like a bit of extra processing just for that (unless you plan to use that array in the scratchpad later.)

          --Chuck Tomasi
          --Sr. Technical Product Marketing Mgr, Now Platform
          --Knowledge 18/CreatorCon Call For Speakers is Open