How insert @Command([EditClear]) within LotusScript codes?

How insert @Command([EditClear]) within LotusScript codes?Hi, Behind the “Move to Trash” action button of Lotus email, there is a formula code as this:

@Command([EditClear]),it will move current selected document(s) to trash view (Not folder),

Now, I want to embedded this formula in my lotusscript code since we do not have the equivalent code in script.

In my lotusscripts, I have a loop, and within the loop based on certain conditions, I need this code to move that email to trash.

it seems the Evaluate does not work in this case such as: Evaluate (@Command([EditClear]), appreciate any help, thanks a lot,

Subject: Use the Help :sunglasses:

As it says in the help for @command ([editclear]) the lotusscript equivalent is DeleteDocument method of LotusScript NotesUIDocument class