How to determine if a beforeSave hook was called for update?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tothewine
    Active Community Member
    • Jan 2018
    • 373

    How to determine if a beforeSave hook was called for update?

    if I want to find out if my php hook is being called as part of entity creation I do $entity->isNew();
    But how do I differentiate if the entity is being edited with the 'Edit' button or by updating a single field?
  • yuri
    Member
    • Mar 2014
    • 8492

    #2
    They are not distinguishable.
    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


    • tothewine
      tothewine commented
      Editing a comment
      Well, then I propose a feature request (low priority) to send an X-Header with the request type from the client js.
Working...