InventTable fields not populating on salesLine.

I have a few fields in the InventTable which should populate on the salesLine while creating a new sales order. I created a few columns in the sales line pointing to these fields. So when an item is selected on the sales line, the values for these fields must be populated as well. I have an InventTable datasource in my salesTable form. However, even if i populate the fields in the Invent table, they are not reflecting in the sales line. Any idea about how to proceed?

What do you mean by this? Please elaborate.

The requirement slightly changed. What I mean is, there is a field (PM_Allowed) which is a checkbox in the Item details form. This should populate in the sales form as well while creating a new sales line. For this I created another column in the sales line and wrote a data method to get the value from the item details. So when a particular item is entered in the sales line, its corresponding value (Checked or unchecked) for that item is populating in the field.

In the sales form there is a button which should enable when the PM_allowed is checked for that particular item and disabled when unchecked. The problem is, when I manually check the checkbox in the sales line form the button works fine.
However when I get the fields in the sales line to populate directly from the Item details form, the button doesn’t work.

To populate the field in salesline, you need to have your code in \Classes\SalesLineType\initFromInventTable
The itemId modified and data source active methods need to trigger the enable/disable logic.

I already wrote the trigger logic in the datasource active method and ItemID modified.
What code should I write in the initfrominventtable?

You can also write your fields initialization code in Tables → SalesLine → Methods → initFromInventTable