Announcement

Collapse
No announcement yet.

Save Entity for not storable fields

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

  • Save Entity for not storable fields

    Hello,

    I want to save my entity after set a field of my entity but this field is not storable in the entityDef because I want to put this field only in the table between the 2 entities.

    But saving doesn't work, so what should I do?

    Btw my field is in entity2's additionalColumns and is mapped in columnAttributeMap.

    Thank you for your answers.​

  • #2
    Hi. You can create a saver class that will handle saving for your custom field. https://docs.espocrm.com/development...rclassnamelist The parameter defines a list of saver classes that processes for an entity one by one.

    Comment


    • #3
      Hi there,

      I wanted to give additional informations about what "sltctom" asked.

      We have a manyToMany relation between 2 entities.
      We added "additionalColumns" in their relation so we could add new fields in the "middle table".

      The problem is that when we want to either ->get('myAdditionalFieldName') or ->set('myAdditionalFieldName', 'myValue') is doesn't work.
      When using ->getAttributeList() on the said entity we can't see the new fields we added into the "additionalColumns".

      Regards.

      Comment

      Working...
      X