Announcement

Collapse
No announcement yet.

findRelated not working as expected

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

  • findRelated not working as expected

    I'm hoping to get the findRelated function working
    there is a one to many relationship between Claims and Adjuster
    my code is as follows
    Code:
    $job = $entity->get('claimsId');
    $entityManager = $this->getEntityManager();
    $claim = $entityManager->getRepository('Claims')->get($jobs);
    $adjusterList = $entityManager->getRepository('Claims')->findRelated($claim, 'adjuster');
    this does not find any related Adjuster(s)

    what do i need to do to get the related entities from another entity??

  • #2
    Is link name 'adjuster'?
    could you share custom/Espo/Custom/Repositories/metadata/entityDefs/Claims.json?

    Comment


    • #3
      i think its adjuster but i tried that and it doesnt work either...
      Attached Files

      Comment


      • #4

        adjusters !

        Comment


        • #5
          Yuri i tried this it doesnt not bring it up

          Comment


          • #6
            hey real quick while i have your attention is it possible to change the order of the panels on the entities to move stream below all the other panels?

            Comment


            • #7
              You can change the order in Layout Manager, but Stream panel always will be first
              What is Layout Manager? How can I configure it? A lot of questions and no answers? Watch the video tutorial below and get acquainted with EspoCRM’s Layout Manager.


              remove extra s
              $job = $entity->get('claimsId'); /// $claim = $entityManager->getRepository('Claims')->get($jobs);

              Comment


              • #8
                is it possible to make stream always be last with some change?

                Comment


                • #9
                  if with hard code
                  set here 20 for example https://github.com/espocrm/espocrm/b...bottom.js#L161 and remove 'sticked'
                  in upgrade safe way - you need to override recordViews detail and set own bottomView for each needed entity

                  Comment


                  • #10
                    so i need to create a detail-bottom.js in each entity folder located in client/custom/src/view/ENTITY/detail-bottom.js?

                    Comment


                    • #11
                      no
                      you need to define in ClientDefs of each module "recordViews":"detail" view.
                      after you create these views in client/custom/src/view/{your-view-name}.js
                      in each of these file you need to override own bottomView, like https://github.com/espocrm/espocrm/b.../detail.js#L96
                      also you need to create this bottom view

                      Comment


                      • #12
                        what do i need to define in order to make them appear how i want? I'm not sure i follow you as i tried to use the unsafe for upgrade and it didnt seem to have any effect on the stream what-so-ever?!?!

                        Comment


                        • #13
                          I think better to do it in not upgrade safe way. I think it will be implemented later

                          this.panelList.push({
                          "name":"stream",
                          "label":"Stream",
                          "view":"views/stream/panel",
                          "hidden": !streamAllowed,
                          "order": 22
                          });
                          Attached Files
                          Last edited by tanya; 08-13-2018, 08:05 PM. Reason: attachment

                          Comment


                          • #14
                            that doesn't seem to work for me.

                            Comment


                            • #15
                              what is your current version of EspoCRM?

                              Comment


                              • dreginald
                                dreginald commented
                                Editing a comment
                                My version - 5.7.6
                            Working...
                            X