7 Replies Latest reply on Oct 3, 2017 12:38 AM by DrizztLU

    How to create a generic Go To Parent action ?

    DrizztLU Apprentice

      Hi everyone,

       

      I would like to be able to open a task in its parent dynamically if it's an Incident or a ServiceReq (Happily that value is stored in ParentLink_Category).

       

      My situation:

      I have a custom object "Meeting" with n;n cardinality to Task (It gather uncompleted tasks from Incident and Service Requests)

      In my Meeting, when I click "Open In Parent" on a task nothing happens.

       

      I tried finding a workaround, via an UI Action, which is surprisingly not working

      It opens the right Object Workspace, but shows "Nothing was found in your search: text contains "undefined"" where the ParentLink_RecID should actually have a value

       

      Here's my try:

       

       

      What am I doing wrong ?

       

      Thanks for your help,

      Dylan

        • 1. Re: How to create a generic Go To Parent action ?
          dcogny Expert

          Hi Drizzt,

           

          Try using "ParentLink" instead of "ParentLink_RecId".

           

          The "ParentLink_RecId" field is an internal field, the "ParentLink" already stores the RecId.

           

          I think that should do the trick, the rest seems fine.

           

          Hope this helps.

           

          Daniel.

          Sent from my mobile, that explains the lack of pictures and the shortage on words... Grammar errors would still be inexcusable.

          • 2. Re: How to create a generic Go To Parent action ?
            DrizztLU Apprentice

            Hi Daniel,

             

            I just tried (sorry for the delay)

            It gets me to the proper object but the search is incorrect, the grid is empty with the following text:

            "Nothing was found in your search: text contains "undefined""

             

            Guess I'll have to create an Incident

             

            Thanks anyway

            • 3. Re: How to create a generic Go To Parent action ?
              dcogny Expert

              Hi,

               

              Re-reading your original post I realized that we are talking about a custom object, the question would be: what information are you using on that object? Meaning, how are you populating the Parent category?

               

              I think that the easiest way would be to create a relationships between "Meeting" and Incident and Service Requests, mimicking the ones from tasks, and then push the following information on linking:

              - ParentLink_Category

              - ParentLink

               

              - (Actually it might be enough just pushing "ParentLink")

               

              In that way you would be able to use the default "Open in Parent" action. The problem right now is that the system has no idea "who" the parent is, so any option you try will fail... 

               

              Bit busy today, so no pictures or anything, but if you cannot get it working with my previous tips let me know and I will do a more deep explanation.

               

              Daniel.

              • 4. Re: How to create a generic Go To Parent action ?
                DrizztLU Apprentice

                Hi,

                 

                Here's the full picture:

                I have my meeting object, in which we add all the tasks marked for discussion in this meeting (a flag to check on the task).

                When you click the "Link All Tasks" button, it performs a Search And Link action on all open task with the flag checked.

                     (Tasks are linked to meeting via a n;n relationship)

                 

                When on the meeting, our customers might need to have a bit more detail about the context of that task (and therefore they need to open the Incident/Change/ServiceReq/...)

                Due to the multiplicity of object that might be concerned, I want an action on that task, which will open the said object (without altering the Meeting object)

                 

                That's why I thought of UI Action on object Task using the ParentLink to find his way back to the Incident or whatever is the parent object

                 

                Here's how it looks like (Don't pay attention to Changes, it's related to Approvals, but we could have a task being the child of a Change, and then need to be able to "GoTo" that change that might not be linked to the Meeting, yes, quite a journey there )

                 

                 

                Thanks a lot for your help,

                Dylan

                • 5. Re: How to create a generic Go To Parent action ?
                  dcogny Expert

                  Hi Dylan,

                   

                  I was able to make it work, this is how I did it:

                  • Created a new "meeting" object with "ParentLink" and "ParentObjectDisplayID":

                  • Created Relationships "Zero or one to zero or many" with both Incident and Service Request (I would have to assume that Change would work too):

                  • Created a Relationship "Many to Many" relationship with Task.Assignment (Just to make it easier for me and have "FusionLink" take care of it, you can create 0/1 to 0/1 by using a "TaskLink" type field):
                  • The important on this relationship it is to push "ParentLink" and "ParentObjectDisplayID" from Task to Meeting on Linking:

                  • And the the "Open in Parent" button worked!

                  Meeting.gif

                   

                  Hope this works.

                   

                  See my next reply... not only this is overkilling it... It will not work with more than one task per meeting! ... Shame... I was so proud!

                   

                  Daniel.

                  • 6. Re: How to create a generic Go To Parent action ?
                    dcogny Expert

                    Suddenly it struck me last night... you can avoid creating all the relationships:

                     

                    • Go to the list you are using for the meeting layout:

                     

                    • Select one field and set it up as a link to the "ParentLink":

                     

                    In your case you can use the "Incident Nr"/"Request Nr" fields. I just tried and it worked without having to create relationships between meeting and any other object.

                    • 7. Re: How to create a generic Go To Parent action ?
                      DrizztLU Apprentice

                      Hi Daniel,

                       

                      That's a nice and smooth solution

                       

                      Thanks a lot for your help,

                      Dylan