hcl-bot
February 24, 2005, 12:53pm
1
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.
hcl-bot
February 24, 2005, 1:16pm
2
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.
hcl-bot
February 24, 2005, 1:29pm
3
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” ; “” ; “” ; “”; “”)
hcl-bot
February 24, 2005, 1:39pm
4
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?
hcl-bot
February 24, 2005, 2:04pm
5
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.
hcl-bot
February 24, 2005, 12:58pm
6
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” ; “” ; “” ; “”; “”)