3 Replies Latest reply on Oct 4, 2016 11:40 AM by florian1

    How to link service request with approvalvotetracking?

    Apprentice

      Hi,

       

      I need a relation in Service request who links all approvalvotetrackings via frs_approval.

      Is it possible?

       

      best regards

      Björn

        • 1. Re: How to link service request with approvalvotetracking?
          florian1 Expert

          Hi Björn,

           

          what are you trying to achieve?

          * If this is just for display purposes, you can use a rollup relationship:

           

           

          * If you want to work with field values from frs_ApprovalVoteTracking, you can add a field in frs_approval and use this as a reference (you can also try nesting a ForEachChild condition but I wouldn't recommend it.)

          For example: I want to notify each approver after a Service Request has been fulfilled.

          1) Add a field in frs_approval ("ApproverEmails"):

          2) Create a BeforeSave rule in FRS_Approval:

          $(ForEachChild("FRS_Approval#",

            RecId,

            "FRS_ApprovalVoteTracking#.",

            $(OwnerEmail + "; "),

            "OwnerEmail ASC"))

          3) Create a triggered action in ServiceReq:

           

          * If you really want to link Vote trackings directly to ServiceReq, you can also add a direct relationship.

          But I prefer having as many relationships out of the box as possible..

           

           

          Cheers,

          Florian

          2 of 2 people found this helpful
          • 2. Re: How to link service request with approvalvotetracking?
            Apprentice

            Hi Florian,

             

            thank you for your very detailed answer.

            The purpose is to configure a preview form which will be used in the grid of the Service requests. In this preview form there should be displayed all open approvals and there approvers. I can only use rollup relationships in child Panels and not in forms.

             

            So, if I undertand you correctly the only way to solve this Problem is to add a custom field in FRS_Approval. An additional relationship is not recommend.

             

            best regards

            Björn

            • 3. Re: How to link service request with approvalvotetracking?
              florian1 Expert

              I didn't mean to say that you should completely avoid it.

              Many times other options are sufficient and it will make your life easier when you have to upgrade to newer HEAT versions.

               

              But if I really had to use the "related objects list" control type instead of a concatenated string, I would definetely create a relationship.

              Fortunately we are already pushing the parent object's RecId to each vote out of the box:

               

              So you will only have to

               

              - Add an associated relationship between Change and FRS_ApprovalVoteTracking:

              -> Name: ChangeAssocApprovalVoteTrackings

              -> Cardinality 1:n (Change.RecId = FRS_ApprovalVoteTracking.PrimaryParentRecId)

               

              - modify the grid view's preview form:

              -> add a "related objects list" and configure the flex settings as needed.