Right methods logic implementation for CreateAction

Hi,

I used an Entity Listener in order to implement some business logic. I utilized persistence interface and entity parameter (AfterUpdateEntityListener Interface).
Now the same business logic I have to implement for Create Action class (button).What are the corresponding (persistence and entity) methods in this case (in order to access data).

public class TransactionBrowse extends AbstractLookup {
    
    @Named("transactionsTable.create")
    private CreateAction transactionsTableCreate;

    @Override
    public void init(Map<String, Object> params) {
        transactionsTableCreate.setAfterWindowClosedHandler(((window, closeActionId) -> {

        Do something;

  } ));
}


For instance I need to access (here): entity.getTransaction().getId()

Should I use DataManager instead EntityManager?

Yes. See this guide and documentation for more information.

Thank you!

I saw in support discussions that DataManager is working only with Entities not with attributes of Entities (for security reasons).
On the other hand I saw that there is possibility to control attributes with DataManger (jpql queries etc).
Can you provide more details pls. When should we use DataManger when EntityManager.