setmode

change the current mode from this window

 

document.setmode("

 

Example:

Switch to update mode

if (document.setmode("update") == -1) {
   messagebox("error","beaszgr054","You have no access authorization!"); 
   return -1; 
   }

 

Change mode from current window

 

Mode

Description

ok

change to ok mode (1)

if data changed, beas start update process.

cancel

switch from mode 2/3 to mode 1 without trigger update/add command.

if data changed, beas don't start update process

update

beas go to edit / update mode (2) and change the Button "OK" to "Update"

if the user don't have access or update mode not possible, beas return failure

add

beas go to add mode and change the "OK" Button.

if the user don't have access or update mode not possible, beas return failure

Attention

If you change to add and you don't change the primary key, you can have a duplicate sql error

lock

cancel update/add process, go to ok mode and lock all fields

only Beas form.

 

read current mode: document.mode

 

ib_formmode_new,ib_formmode_update,ib_updatemode,