Announcement

Collapse
No announcement yet.

one to many, update fileds from many side

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

  • one to many, update fileds from many side

    i have 2 entities A and B, one (A) to many (B) , form the B side (in formula i can get A attributes, but i can not update them), HELP

  • #2
    In your case will work record\update: https://docs.espocrm.com/administrat.../#recordupdate.

    For example, a One-to-Many relationship is established between entity Case and entity Account. We want to put value of the description field from entity Case into the description field of entity Account.

    In Administration > Entity Manager > Case > Before Save Custom Script > Formula insert the formula:
    PHP Code:
    record\update('Account'accountId'description'description); 

    Click image for larger version  Name:	image.png Views:	0 Size:	13.0 KB ID:	103212
    Last edited by victor; 02-29-2024, 11:28 AM.

    Comment


    • zerosix
      zerosix commented
      Editing a comment
      Thank you victor, yes it works this way,
      Account.description=description; way is not working
Working...
X