This code satisfies three requirements:
1) prevent users from saving a form via menu or keyboard controls; only the action button can be used for saves
2) only use ONE field to accomplish to keep application overhead down
3) depending on a value in a status field, action button should issue file save or file save new version
AllowSave field: Editable, Text, Hidden
Default value = "0" Validation = @If(AllowSave = "0"; @Failure(...); @Success)
Action Button:
FIELD AllowSave := "1"; @If(Status = "Open"; @PostedCommand([FileSaveNewVersion]); @PostedCommand([FileSave]) )
Form PostOpen Event:
FIELD AllowSave := "0"; @SetField("AllowSave"; "0")