I have a form for procedures, and there is a button that says Update Procedure, what I would like it to do is put the status of Archive on the current Procedure and then open up another form that inherits the data and let the user edit that document. (we have to archive the current procedure without changes due to the workflow and if we are audited on our procedures.) I can get it to archive the current form and open a new form with the data, but I would really like it to close the first form. Everytime that I put in @Command([FileCloseWindow]) on the button, it fails. Is there something I am missing, this is my current code I am using on the Action
FIELD AllowClose := "1";
FIELD Status :="Archived";
FIELD Person := @If(Person="";@Name([CN];@UserName);@Name([CN];@UserName):Person);
FIELD Action := @If(Action="";"Archived";"Archived":Action);
FIELD ActionDate := @If(ActionDate="";@Now;@Now:ActionDate);
I have tried putting the @Command([FileCloseWindow]) before and after the Compose and I have also tried it as a @PostedCommand.