Pages

Banner 468 x 60px

 

Wednesday, November 22, 2017

AX 2012 Display methods – Different datasources – Same control

0 comments
AX 2012 Display methods – Different datasources – Same control :

AX developers always come across a requirement of showing data from different datasources on the same control though these datasources should be related to each other. The solution to this requirement is to define display methods on the table which you choose to be the control datasource. Display methods are very handy for showing data from related tables.
Consider for example the following tables:
1. CustTable
2. DirPartyTable
3. BankGroup
If we need to show CustTable.AccountNum, DirPartyTable.Name and BankGroup.Name fields on the same control let’s say a grid control then we need to define the following display methods on CustTable if we have chosen CustTable as the grid’s datasource.
To retrieve DirPartyTable.Name
To retrieve BankGroup.Name
Now on the grid control, add  two StringEdit controls to bind them with the display methods just defined above. Make sure to specify CustTable as the grid’s datasource. Also you must be setting DataMethod property of the StringEdit controls to the name of the respective display methods.

The result is awesome. You have one grid control showing data from different datasources!



0 comments:

A financial dimension value is based on the LAND-00013 record and has been used on a transaction. You cannot delete the LAND-00013 record AX 2012

 A financial dimension value is based on the LAND-00013 record and has been used on a  transaction. You cannot delete the LAND-00013 record ...