Form to table

Hi All,

I have to fetch the value of a form’s field in to my table in Ax 2012.

the Form is : PriceDiscActual, this form has a field called “Contribution Ratio” which is actually getting value from a display method written in form data source(inventTable.contributionRatio). now i would like to get this value for a “selected item” in to my code, through which i am exporting the values to Excel sheet using command button.

Please provide some suggestions.

Thanks& Regards

Pranav Gupta

Just call the method (InventTable.contributionRatio()). Is anything preventing you from doing that?

Hi Martin,

Actually that method is used only for that form, means if you check the global InventTable, you can see that there is no such method, that method is being written particularly for Form “PriceDiscActual”, and since its a display method the value is not getting stored anywhere.

That’s why i am not able to fetch the method.

How ever i have find an alternate way for this, i am using a formula for contributionRatio

The formula is ContributionRatio = (Salesprice - Price) / SalesPrice * 100.

here SalesPrice is the TradeAgreement Sales price for an item & the Price we get from the following path given below:

Product information management/Common/Released products -->ManageCost Fast Tab–>ItemPricebutton–> Price field.

Thanks & Regards


I see. The method in PriceDiscActual form depends on some unbound form fields, so you couldn’t use it in the way you intended.

I hope you couldn’t use the way you liked…

Hi martin,

Thanks a lot for providing the information, but i have to use the formula since its working fine & also since i have no other way to get the contributionRatio.

Thanks & Regards