Announcement

Collapse
No announcement yet.

How to execute a formula when a record is deleted?

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

  • How to execute a formula when a record is deleted?

    I have two entities related one-to-one. I want that, when I delete a record from entity 1, the related record from entity 2 is also related.

    I could do this:

    Code:
     record\update(ENTITY2, ID, 'deleted', true);
    but my problem is that the formula is not executed when I delete a record (with the GUI), any idea on how to do it?

  • #2
    Your code should work, but here is the part missing, as when this should happen. I guess, you will need a ifThen formula with your formula in the "Then" part:

    ifThen(
    record\update(ENTITY1, ID, 'deleted', true);
    record\update(ENTITY2, ID, 'deleted', true)
    );

    Comment

    Working...
    X