chethu4u143
5th July 2011, 15:05
Hi Baan gurus,

I need some suggestions on my requirement. I work on Baan IV b2.

On the single occurrence maintain session for planning department , I have 15 fields on form (main table tdsls041), and this will update history , deliveries and subordinate tables as per business rules, now the new change requested is.
Out of 15 fields on form, if and only if 5th field (plan del date ) is changed and others remains the same, I should prevent update of one field in deliveries table(tdsls045.pmsk) and all other conditions and validations should remain same. Actually this update will happen at some function called by this program after series of other validations.

What is the better way to achieve this request ?

My current thoughts are:
1. Use flags on each input fields and make sure if and only if this 5th field (plan del date) is changed, then in after.update.db.commit event, revert back the tdsls045 field value to its old value by again performing the update.
2. Anyways History (tdsls051) will be maintained in each case, so compare the history records and if and only if the 5th field is changed then again revert back the 5th field content.

Any better ways to handle this request ?
Your help and suggestions is highly appreciated,

Thank you,

mark_h
5th July 2011, 15:33
Can't you do it with just 1 flag? If any field is changed then the field five only flag is false. Of course with it being a multioccurence session I guess you would need an array of flags to track each occurence displayed on the screen.

chethu4u143
6th July 2011, 14:20
its single occurrence only, but the problem is, the session has 6 custom buttons (choice options) which may also update any of these fields, So i wanted to make sure that only this field was modified and hence no update at delivery table field is made. So i wanted better approach to handle this scenario

inputs are really appreciated.

Thank you,

mark_h
6th July 2011, 15:40
Single occurence session makes it easier. I can't think of anything besides what you have suggested as a solution.