< Back

Document Subject: How do I prevent the Save changes yes no cancel button ?
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#SaveChanges or http://A555F9/nn.nsf/ByAlias/SaveChanges

When you have a save action you sometimes get the message: Save changes yes no cancel. Here's how to prevent the dialogue coming up.




Put in the action formula:

FIELD SAVEOPTIONS:="0";

@postedcommand([filesave])

 

Note there should be a field on the form called "SaveOptions" withe value "1" and it should be editable.

Alternatively you can put in the formula:

 

r:=@command([filesave]);

REM "if r=0 then save has failed due to querysave or input validation checks.";

@If (r=0;@Return("");"");

@postedcommand([filesave]);

@postedcommand(fileclosewindow])

 

or a combination:

r:=@command([filesave]);

REM "if r=0 then save has failed due to querysave or input validation checks."

@If (r=0;@Return("");"");

FIELD SAVEOPTIONS:="0";

@postedcommand(fileclosewindow])

 

In the discard changes button you can put:

FIELD SAVEOPTIONS="0"

@postedcommand(fileclosewindow])