learn_ln6
24th December 2006, 20:05
Hi all,

I have Create One Maintain Session...and in maintain session i have create one button done .

after change the Date in maintain session i want to save the data on the done button click .

I don't want to use baan Standard Save Option.

please advice how to save the data on Done Button click

thanks

mr_suleyman
25th December 2006, 07:59
Firstly, disable save button from form properties. Do save operation in your session code like that

maintain.table.io:
before.write:
if (button.pressed) then
else
skip.io("")
endif

maintain.table.io:
before.rewrite:
if (button.pressed) then
else
skip.io("")
endif

bigjack
26th December 2006, 08:35
Hi,

Like suleyman said you can disable standard save , save & exit buttons. I guess you are on LN , then you can rightclick on your session to get standard commands. In this standard commands uncheck the save , save & exit option.

Now you will need to create a button to simulate the save action. Goto form commands and create a new form command. In the "activate a" drop-down box select "function" and give function name as "save". Now you will have to code the save action in save function via program script. In your program script you may add following function

function extern save()
{
execute(update.db)
}

Let me know whether this works for you.