Action will not update a field

I have an action that should change a date field on the main form and print a renewal letter. The code is as follows:

@SetField (“Renewal_Printed”; @Today);

@Command([FilePrintSetup]);

@Command([FilePrint] ; “1”; “”; “”; “”; “”; “Renewal” ; “” ; “” ; “”; “”)

The letter will print but the field does not update. If I change the action to just the @setfield it works fine, but I wanted to do it in one step. Thanks.

Subject: Action will not update a field

I’m Sorry I was not in edit document and never thought of filesave. Now the code reads:

@Command([EditDocument]);

@SetField (“Renewal_Printed”; @Today);

@Command([FileSave]);

@Command([FilePrintSetup]);

@Command([FilePrint] ; “1”; “”; “”; “”; “”; “Renewal” ; “” ; “” ; “”; “”)

still with no luck.

Subject: RE: Action will not update a field

Try

@if(

!@isDocbeingEdited;@Command([EditDocument]);

""

)

@SetField (“Renewal_Printed”; @Today);

@Command([FileSave]);

@Command([EditDocument]);

@Command([FilePrintSetup]);

@Command([FilePrint] ; “1”; “”; “”; “”; “”; “Renewal” ; “” ; “” ; “”; “”)

Subject: RE: Action will not update a field

That code seemed to be working for me (with a simple form) - what type of field is Renewal_Printed? Any other code executing on save?

Subject: RE: Action will not update a field

The Code posted is the entire code of the action. The Field is a Date/Time Field.

Subject: Action will not update a field

Assuming you are exceuting this action from an action with the document in edit mode (you did not specify):

@SetField (“Renewal_Printed”; @Today);

@Command([FileSave]);

@Command([FilePrintSetup]);

@Command([FilePrint] ; “1”; “”; “”; “”; “”; “Renewal” ; “” ; “” ; “”; “”)