2 Replies Latest reply on Dec 16, 2015 4:08 AM by [email protected]

    Enforce a task linked to a Service Request.

    pbeard Rookie

      Hello, my customer would like to ensure every Service Request and Incident has at least one task linked to it. I was able to get this to work for Incident, but not a Service Request. Basically I have a Business rule, Validation expression to use the ChildFold to evaluate how many tasks are linked to its Parent.  This code works great on an incident but does not work on a request.

      Here is my incident expression: which works great

       

      $(if ChildFold("Incident#",

                     RecId,

                     "Task#Assignment.Rev3",

                     "1",

                     "+",

                     "") >

           0

        then true

        else false)

      Here is my Service Request Expression: Which doesn't seem to recognize the task is linked.

       

      $(if ChildFold("ServiceReq#",

                     RecId,

                     "Task#Assignment",

                     "1",

                     "+",

                     "") >

           0

        then true

        else false)

       

      I though initially it was the reference to the relationship "Task#Assignment"

      but, I have this expression ensuring there is no active tasks prior to fulfilling the Request, and this works just fine!

       

      $(Status != "Closed" && Status != "Fulfilled" ||

        IsTrueForAllChildren("ServiceReq#",

                             RecId,

                             "Task#Assignment",

                             "$(Status == 'Completed' || Status == 'Cancelled' || Status == 'Rejected')"))

       

      Any Idea's, or another way to force a task on an Service Request?

      Thanks All!

      Paul B