I have a requirement where two fields from the item details form should get auto populated in the sales line when the item is selected. Once I was able to populate the fields of the item details form in the sales line. Now I have a button which, Based on the values of the fields, should enable or disable. For example, one field is PM_allowed. For a particular item if this is checked, then the button in the sales form should enable and vice-versa. This button opens a dialog box. Based on the value in the other field (no of chars) the dialog box should open a text box accepting that many characters.
The logic seems good. I managed to write code in the active method of the data source for the enable disable logic and write code in the button for the number of characters it displays. It works fine when I change the values in the sales line. The button works good and the no of chars are also as expected. However, when I try to get the values to populate directly from the item details form, the values are populated correctly in the sales line but the button functionality has a mind of its own. It suddenly doesn't take values from the sales line. I wrote display methods for populating the values in the sales line from the item details form.
I am able to get the button to work fine and the fields to populate correctly but separately. When I combine them together, the button doesn't work. Any idea as to why this is happening? Any solutions?
*This post is locked for comments