1 Reply · Latest reply on Dec 4, 2017 2:50 AM by Varad Kulkarni

    Is it possible for Case Ticket to have child Incident, Problem and Change?

      Hi,

       

      I was trying to customize the Case Form and could not find the field to for Incident. Would it be possible to have a CASE (CSM) Parent and link to Incident, Problem and Change as Child tasks?

       

      Also can you share script that will close the parent if those Child tasks are resolved? Thanks

        • Re: Is it possible for Case Ticket to have child Incident, Problem and Change?
          Varad Kulkarni

          Hi Joan R,

           

          Though it is technically possible to have a parent CASE to have child incidents/problem/change, I am unable to understand the business need for the same. Rather I would suggest for the generic tasks to be created for CASE and further you can close the case once all the child tasks are closed.

           

          Sample script will be like below

           

          if(!(current.parent.nil()))

          {

          var alltsk = new GlideRecord('task');

          alltsk.addQuery('parent',current.parent);

          alltsk.query();

          var allclosed = 1;

          while(alltsk.next())

          {

          if(alltsk.state !=3)

          {

          allclosed = 2;

          break;

          }

          }

          if(allclosed == 1)

          current.parent.state =3;

          current.parent.update();

           

          }

           

          Best Regards,

          Varad

          1 of 1 people found this helpful