Determine if editor screen was called with "Create" or "Edit"

Is there a way to determine in an editor screen whether it was called to create a new entity or whether it is editing a previously existing entity?

Answered my own question. What I wanted to do could be done in the initNewItem() method of the editor or by using setInitialValues or setWindowParams of the action object in the calling page.


also you can check if your entity is new:

if (PersistenceHelper.isNew(getItem())) {
  // create
} else {
  // edit
1 Like