I am trying to understand the order execution, have read the help and all forum posts concerning this issue, but still cant seem to find the logic behind them.
I ceated a new empty form containing a button with the follow code:
@Command( [EditDocument]; “1” );
@SetField(“SomeField”;“Value”);
Also adding the following, with obtained result:
1)@If(@Command([FileSave]);@Command([CloseWindow]);“”) → [OK]
2)@If(@Command([FileSave]);@Command([FileCloseWindow]);“”) → [save prompt]
3)@If(@Command([FileSave]);@PostedCommand([CloseWindow]);“”) → [save prompt]
4)@If(@Command([FileSave]);@PostedCommand([FileCloseWindow]);“”) → [save prompt]
5)@If(@PostedCommand([FileSave]);@PostedCommand([CloseWindow]);“”) → [OK]
6)@If(@PostedCommand([FileSave]);@PostedCommand([FileCloseWindow]);“”) → [OK]
It does not make any sense to me.
I did all those tests because I had a more complex specific problem, where in a reponse document, between the FileSave and CloseWindow, I set a field of the parent document.
In some scenarios, the client is crashing or I get save prompt. I finally had to use SaveOption to resolve this, which I guess you should not have to.
Those command certainly dont seem to work as documented…
Thanks all.