Saving document duplicates it

Hi,

I encountered some strange behaviour in an app where mails are store (not a standard-mail-DB!). When the employee who is in charge of handling this mail tries to set the mail’s status to “done”, a copy of this mail is created, but the original mail remains in the same state & same content it was before.

The action on the mail’s form contains this code:

@Command([EditDocument]; “1”);

@SetField(“Status” ; “done”);

@SetField(“Wiedervorlagetermin” ; “”);

@SetField(“DatErledigt”; @Now);

@SetField(“Log” ; Log + @NewLine + "Auf ‘erledigt’ gesetzt von " + @Name([CN] ; @UserName) + " - " + @Text(@Now));

@If(

@Command([FileSave]);

	@PostedCommand([FileCloseWindow]);

	"")

Can anybody give me a hint please???

Of course, not every mail behaves like this :expressionless:

Thanks in advance,

Buzzy

Subject: Saving document duplicates it

Check the form properties for versioning control to see if updates are saved as new versions.

Also check the form events for code which might create a copy (eg. PostOpen, QuerySave, PostSave, etc).

Alex

Subject: RE: Saving document duplicates it

Hi Alex,

no versioning activated and the only event is on PostModeChange, which simulates the F9-key.

Greetings,

Buzzy

Subject: RE: Saving document duplicates it

There will be versioning involved if the mail was created from stationery – saving as stationery adds the version control fields to what was just a Memo document.

Subject: solved!

8-O

Yes! Yes you’re right - many of the mails from one “suspect” user (who sends mails to the app) include the $VersionOpt-field!

GREAT hint g

Thanks a billion times,

Buzzy