Friday, February 3, 2012

update.status and update.occ()

When we create session with form field and need to update form field data to table using standard save functionality as "Choice Update.DB". Normally when we use table fields and if we made some changes then system understand the record is modified and update.db will get hit. But whenever we use form fields we need to tell system this field has changed by using following code.

field.:
when.field.changes:
update.status = modify.set
update.occ()

This will force LN to call choice.update.db section.

Suppress Standard Message After Save

This is common requirement while creating update session and updating same by form command. Once we update by using form command function while closing session system display error message "Do you want to save record?".

Now to avoid this we have to tick check box in form command as "Save before Execute" on second form.