Announcement

Collapse
No announcement yet.

Display related record in Opportunity side panel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display related record in Opportunity side panel

    Hello guys,

    I am trying to understand how relationships work in Entity manager because there is not much information in the documentation.

    We have Leads->converted to Opportunities->then from opportunity workflow creates related record "Zakazka"(you can understand it as "order").

    There could be multiple Zakazka generated from one opportunity(based on the number of products in the opportunity).

    I would like to display those related Zakazkas(all of them) in the opportunity side panel.

    When I set relationship one-to-many in opportunity and then displayed this field in the side panel layout of opportunity, I can only manually add there anything from Zakazkas but I would love to have it there automatically. Is there a possibility how to display all related Zakazkas in the opportunity automatically, please?

    I hope it is understandable what I am trying to achieve.
    Thank you!
    Attached Files

  • #2
    as long as the opportunity is linked with Zakazkas then they should appear on the sidepanel automatically. if not you need to check that the workflow create the relationship between the opportunity and the Zakazkas.

    Comment


    • #3
      hello rabii according to the screen it should be creating relationship, or can I check it somewhere, please?
      Attached Files

      Comment


      • #4
        correct that should create related entities Zakazkas. can you check the log of the workflow to see what happened there ?

        Comment


        • Jakub Grufik
          Jakub Grufik commented
          Editing a comment
          hey, the workflow is working properly and all Zakazkas are generated as should be, the problem is that I do not know how to display them in the opportunity side panel

      • #5
        I tried to create relationship in opportuinity (One-to-many) and then display this field in the side panel, but as I mentioned I can only add zakazkas manualy one by one to this field, it is not a list of related Zakazkas (automatically show all realted Zakazkas to this opportunity)

        Comment


        • #6
          Make sure on the relationship to enable Link Multiple Field (checked) also make sure that you are not showing the same field on the bottom panel of the opportunity. i have tried it and it worked fine.
          Attached Files

          Comment


          • #7
            oh god I finally understand how it works the problem is that I have created a new relationship, but I was trying to display Zakazkas, which had the old relationship in a time when it was generated.. originaly it was Parent-to-children, so I can only display relationship panel in the left record and link field in right record ) finally I got it

            do you by any chance know, if the parent-to-children "relationship panel" can be displayed in the side panel instead of the bottom one, please? Same for One-to-many, can the list of related entities in the left record be displayed on the side instead of bottom?

            Thanks a lot for the help so far!
            Last edited by Jakub Grufik; 01-26-2023, 08:34 PM.

            Comment


            • #8
              what do you mean by do you by any chance know, if the parent-to-children "relationship panel" can be displayed in the side panel instead of the bottom one, please?

              based on your scenario parent is Opportunity and you want to display Zakazkas on the side panel panel instead of bottom ?

              Comment


              • Jakub Grufik
                Jakub Grufik commented
                Editing a comment
                exactly, the list of related records can be displayed only at the bottom so we have to scroll through the whole opportunity to be able to see it. Nothing world changing, but would be nice to have it on the side. I guess its not possible.

              • rabii
                rabii commented
                Editing a comment
                it is possible. if you share the correct names of the relationship (links) i would try and provide you with a working code. if it is ok to share the relationship screenshot just like the one i provided on https://forum.espocrm.com/forum/gene...7514#post87514
                i will be happy to write code for you.

            • #9
              I have another question please.

              Is there any way how to relate 300 Zakazkas with opportunities somehow automatically, when the relationship is newly created? I found record\relate() function but I am not sure if I am able to get the IDs of left and IDs of right records to be able to pair it.

              Thanks a lot! Appreciate the help.

              Comment


              • Jakub Grufik
                Jakub Grufik commented
                Editing a comment
                I guess this is not an easy task because system do not have anything to use to recognize the relation. Because the relationship was not existing in the time when the record was created.

              • rabii
                rabii commented
                Editing a comment
                you can still use formula but the issue is that the system will just randomly relate opportunities with Zakazaks unless if there is an identifier that could bring both sides together e.g if both opportunity and Zakazaks share the same product etc.

                everything is possible with espocrm i guess. other option is to just do a mass update if you know which opps should be linked to which Zakazaks.

            • #10
              hello rabii I am so sorry that I was not replying in last couple of days, I am out of office because of the knee surgery I had couple days ago.. I am currently not able to focus on work so I have to pause this topic.

              Thanks a lot for being so kind and helpful man! I really appreciate it.

              Comment


              • rabii
                rabii commented
                Editing a comment
                Hey @Jakub

                I hope you feel better. rest up and feel better man.

                Thanks
            Working...
            X