How to Create Cross Company LookUp in Ax 2012

Description:- Cross Company Lookup is nothing but we can See or access other Company Data in AX 2012. If someone want to See Data from Other Company Here Company is nothing but a legal entity which means Provide data in current legal entity. We can Override cross company and see data from other company.

Let’s start how to achieve that functionality in AX.
Create Table and add some field in Table and Name it “CrossCompanyTable”.

Create Table Name it “CrossCompanyTable”.
  • Expand AOT Node.
  • Open Data Dictionary Node.
  • Select Tables and right Click Select New Table.
  • Name it “CrossCompanyTable”.
  • Now open table in Insert Some Data in CrossCompanyTable.
  • Now in Legal Entity Field bind EDT SelectableDataArea.

Now create form so we can create our Customization in form.
Now Create Form and Name it “CrossCompany”.
  • Expand AOT Node.
  • Select Form Node and Right Click Select New Form and Name it “CrossCompany”.
  • Now Drag and Drop Table in Form DataSource.
  • Select Design Node Right Click and Select New Controls & Add Grid Controls in Design Node.
  • After drag and drop field from DataSource into the grid.

Now Select ProjId from Grid Controls and Override Look Up Method.

After Method Will Open and Code for Create Custom Lookup in ProjId in Grid Control.

Now when we Select Project Id Then we want to Retrieve That ProjectId name Form That Legal entity for that We Will Override modified Method from ProjId. Now Override modified Method in ProjId.

Now Open your Form and Create New Record by Pressing (Ctl + N) or from File Menu and Select Legal Entity from Company Lookup. Now Select ProjId from ProjectId Lookup.

Now Create New Entry and Select Other Legal Entity from Company Lookup and Select ProjId. You can see That ProjectId is coming from that Legal Entity.

You can also this functionality by Selecting AollowCrossCompanyAutoQuery to True at DataSource Level. If you are using query in DataSource.

Related Posts

Previous
Next Post »