Announcement

Collapse
No announcement yet.

additionalLayouts for custom entity

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

  • additionalLayouts for custom entity

    Hi Folks,

    I have a custom entity called (Offer) that has a M:M relationship with contacts and also M:O relationship with contact. Basically it is similar to what is already used in the opportunity contacts functionality, i want to add the a small list layout on the contact which display the offer entity same like (listForContact) layout on the opportunity (see attached screen shot). I have already created a list called (listForContact) on the custom/Espo/Custom/Resources/layouts/offer/listForContact.json and also added additionalLayouts on clientDefs of my Offer entity with this code :

    Code:
    "additionalLayouts": {
    "detailConvert": {
    "listForContact": {
    "type": "listSmall"
    }
    },
    But it is not shown on my offer entity layout.

    How can i add such additionalLayout please.

    Many thanks
    Attached Files
    Last edited by rabii; 11-22-2021, 03:45 AM. Reason: Corrected some values

  • #2
    Consider that you need show a EntityB custom small list in EntityA.
    You can follow next steps

    1. Create file custom/Espo/custom/Resources/layouts/EntityB/listForAEntity.json and write the following:

    Code:
    [ {"name":"name"} ]

    2. Modify file custom/Espo/custom/Resources/metadata/clientDefs/EntityB.json adding the following:

    Code:
    "additionalLayouts": { "listForAEntity": { "type": "listSmall" } }

    3. Modify file custom/Espo/custom/Resources/metadata/clientDefs/EntityA.json adding the following:

    Code:
    "relationshipPanels": { "relationAlias":{ "layout":"listForAEntity" } }

    4. Now you can custom visible fields on EntityB layout edition.​

    Comment


    • #3
      thanks i have already find out the solution, in fact i have done it before but forgot.

      thanks for your help

      Comment

      Working...
      X