OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions Custom PrePersist

This topic contains 3 replies, has 2 voices, and was last updated by  Julien VINAI 6 years ago.

The forum will run in the read-only mode starting from March 1. Please head to StackOverflow for support.

  • Creator
  • #28017

    Julien VINAI

    Hello everybody,

    I would like to create a @PrePersist action for an OroCRM entity like Contact.

    I can’t use @PrePersist listener for this entity because I need to make a request on another table via the EntityManager.

    For example, I would like to count each Contact’s calls and save it in a new Contact’s field: calls_count.

    I have two possibilities:

    • Using Oro Workflows:
    • Using Doctrine Listener:

    Can you tell me which one is the best choice ? :)

    SYNOLIA – Lead Developer

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No