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

    Change Management

      Hi,

       

      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);
      gr.query();
      while (gr.next()){

             impacted_cis.push(gr.cmdb_ci_service);
      }
      workflow_scratchpad_impacted_cis = impacted_cis;
      if(workflow_scratchpad_impacted_cis != '')
      {
        return 'yes';
      }
      else
      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
          --Q: Do you know how much that requirement will cost to implement?