How to check in a AbstractEditor is an entity is new or edited

Hello Support Team,

can you please advise me on the right way to check in AbstractEditor if the entity is a new entity or edited entity.

Alternatively if there’s is a way i can know the calling action is create or edit. that would also solve my problem.

Import the PersistenceHelper class, then call isNew on the entity you want to test.