How to create an action that deletes the document on click?

How do i create an action that deletes the document on click? The formula @Command([EditClear]) simply marks the document for deletion, i still had to refresh the view to delete it.

I want to move it to the trash immediately on click of a button.

Subject: How to create an action that deletes the document on click?

Use the below formula on your action button for deleting the documents from a view:

@Command([MoveToTrash]);

@Command([EmptyTrash])

Regards,

Balu M