Monday 3 June 2013

Reference LookUp in Ax 2012


Creating a Simple Reference Lookup :


We can create a simple reference lookup for reference controls using the SysReferenceTableLookup class . These are the steps to do so.

  1.  Create the SysReferenceTableLookup Object.
  2.  Create the query which will be used to select the lookup data.
  3.  Add the fields to be shown in the lookup.
  4.  Perform the lookup.
 
I will demonstrate by a simple example as shown below.

We need to override the lookupReference method of the field at the form dataSource level or a Control at the form design level . It is better to override at the datasource level instead of design level.


Just copy the code above and make  necessary changes according to your scenario and your lookup is ready to Go !!

Keep Enjoying ... 

0 comments:

Post a Comment