SaveOptions, FileSave and save prompt

I have an action button that flags certain emails in a database with a particular icon. This works fine with received emails. However, if I try to run this action on an email that I sent myself I get the save, send, send and save prompt.

I want to bypass this prompt in all cases. Can anyone help me out? I’m beyond frustrated.

Here’s the code for my action button:

@Command( [EditDocument]);

@SetField(“_ViewIcon”;49);

FIELD SaveOptions := “1”;

@Command([FileSave]);

@Command([FileCloseWindow])

Thanks in advance,

Mike

Subject: SaveOptions, FileSave and save prompt

The reason you get this is because the memo form is set to display the mailsend dialog on close (check form properties)

Are you running this from a view?

If so you should ditch the EditDocument/FileSave/FileCloseWindow because you don’t need to open save and close the document/s as a notes agent will handle this

Create an agent that is set to run on all selected documents

the formula should read

Field _ViewIcon:=49

Thats should be it

Highlight any document you want and run your agent.

Regards

T