Delete draft action does not work

strangely, the following action does not seem to delete the draft.
I checked the syntax in the drafts reference docs
thank you
// See online documentation for examples


//set the current draft as trashed (deleted)

draft.isTrashed = true;

//Show the list of drafts


  1. No need to script to delete a draft, I would just set the “After success” setting for the action to trash the draft.

  2. It does not move because you do not call the draft.update(); function to persist changes. Scripted changes to a draft are transient unless explicitly committed with an update call.

1 Like

thank you Greg.
transient changes: good to know
In the case of your option 2, I would not have the possibility of app.showDraftList(); after the deletion, or am I mistaken ?