dhowells
23rd August 2010, 22:44
Hello.

I have a maintenance session that is type three. The primary table is custom and one of the fields is item. Also required on the form is the country of origin from the item master. Our goal is to allow maintenance on the custom table AND the item master field Country field on tiitm001. The issue we are having is when a user changes ONLY the Country field, since it is not from the main table, doesn't get updated. Since it is type three, storing values before input is quite cumbersome due to the fact the user can click all over the place.

What tricks have been used to enable standard Baan session functionality, while maintaining additional tables? I have gone back and forth with using variables, the actual item master field, etc. Is there a way to flag or trick Baan into thinking the main table has changed? Anyway, each scenario presents it's own set of challenges. Thanks in advance for any suggestions.

Thanks,
Dan

BaanInOhio
24th August 2010, 01:24
You can use the item master field on the form and in the program script when it is selected for update after the related record is read in the main table. You can also use a local variable and select for update and write after an update is done for the main table record. In either case, when field changes for the desired field, call "update.occ()" to make Baan think that the record is marked for update. This permits selection of the save/save and exit buttons. db.update the item master record (select for update and apply local variable first if using a local variable on the form) before choice.update.db

If you have issues with the 'update.occ()' working as expected, you might have to call it within a function referenced by 'do.occ()' or 'do.all.occ()'.

Hitesh Shah
24th August 2010, 07:40
Any field of custom table which is main table as well can very well be updated to other tables in main.table.io/before.write & before.rewrite sections . So solution probably could be to make variable part of the custom table .