Updating Bill Amount in One-to-Many Relationship: Handling Removal of Bill Lines

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zerosix
    Member
    • Jan 2024
    • 45

    Updating Bill Amount in One-to-Many Relationship: Handling Removal of Bill Lines

    I have two entities with a one-to-many relationship (bill and bill lines). I can update the bill amount after a bill line update using a custom script formula before save custom script. However, I'm unsure how to apply a similar process when bill lines are removed. How can I handle this?
    NB: i am not using the sales pack
  • yuri
    Member
    • Mar 2014
    • 8453

    #2
    I'm not sure there's a solution w/o advanced pack or w/o coding.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • rabii
      Active Community Member
      • Jun 2016
      • 1250

      #3
      Originally posted by zerosix
      I have two entities with a one-to-many relationship (bill and bill lines). I can update the bill amount after a bill line update using a custom script formula before save custom script. However, I'm unsure how to apply a similar process when bill lines are removed. How can I handle this?
      NB: i am not using the sales pack
      You need a afterRemove hook. https://docs.espocrm.com/development/hooks/
      Rabii
      Web Dev

      Comment

      Working...