Blog
Microsoft Dynamics AX Blog
I came across a case where I needed to select a field value from different companies in Dynamics AX.
Simply what you have to do is the following (I choose ItemId to be taken from different companies as an example):
- Create a field in your table with an ExtendedDataType than has NO relation, MyNewItemIdEDT in our example
- Create an ItemCompany field, put the extended data type as dataAreaId
- Create a Relation in that table with the following elements (Normal relation elements):
- <<NewTableName>>.MyNewItemId == InventTable.ItemId
- <<NewTableName>>. ItemCompany = InventTable.dataAreaId
By this you would be able to select the ItemId field based on the selected dataareaid without writing any code even.
Search the site
Dynamics AX 2012 Event
Recent Posts
- D365FO | Cannot Connect to SQL Server Database on Your Cloud Test Machines
- Intro to Microsoft Dynamics AX in Arabic – سلسلة حلقات مايكروسوفت داينامكس إيه إكس بالعربية
- Microsoft Dynamics Launch – Sunday, 24th February – Intercontinental Hotel, Riyadh
- Files of Our AX Brains Dec 2012 Event
- It was a great day!
- Tomorrow is the day for our Dynamics AX Brains Technical Seminar
- Dynamics AX Brains December 2012 Technical Seminar
- Windows Server 2012: Built from the Cloud Up
Tags
.NET
.NET Business Connector
AIF
Amer
Arabic
Architecture
Book
CLR Interop
Community
Database
Development
Dynamics AX
Dynamics AX 6.0
Dynamics AX 2009
Dynamics AX 2009 SP1
Dynamics AX 2011
Dynamics AX 2012
Dynamics AX Brains
Enterprise Portal
Error
Event
GDC
Hijri
IIS
Implementation
Integration
Kerberos
Ledger Journal
Materials
Microsoft stack
MorphX
MSDynamicsWorld.com
ODC Files
Presentation
Sales Order Web Service
Saudi Arabia
SureStep
Training
VISUAL STUDIO.NET
WF
Workflow
Workflow Approval
Workflow Task
X++
X++ Editor
Archives
- October 2019 (1)
- January 2014 (1)
- February 2013 (1)
- December 2012 (4)
- September 2012 (2)
- December 2011 (2)
- November 2011 (3)
- July 2011 (3)
- June 2011 (4)
- May 2011 (3)
- April 2011 (4)
- March 2011 (12)
- February 2011 (2)
- January 2011 (3)
- December 2010 (1)
- November 2010 (1)
- October 2010 (5)
- August 2010 (1)
- July 2010 (3)
- June 2010 (4)
- May 2010 (5)
- April 2010 (1)
- March 2010 (9)
- February 2010 (4)
- January 2010 (4)
- December 2009 (11)
- September 2009 (1)
- August 2009 (1)
- July 2009 (2)
- September 2008 (1)
Random Testimonial
- ~ Mohamed Wajd Haikal, Software Team Leader at IDIS
"Amer is one of my best friends, he always tries to be the best by focusing on gaining new certifications and to have wide relationships"
- Read more testimonials »
Hi Amer,
I tried this but it did not work! how a company can check another company’s data?
Hi Abdullah,
Are you sure that you followed exactly the same steps? I just executed what I have written in my post.. and it did work.
The Result is whenever you selected the “ItemCompany” field, when you go to select the ItemId field… the items shows are the items from the select company (that you selected in ItemCompany).
Still did not show the expected results? If yes, let me please send you the table that I created as an XPO :).
Hi Amer,
Thanks for replying, here what I did:
I have a new table called “Trips”, this table has a field “TripNo” (already created an extended datatype), I added this field to “InventTransferTable” table, also another field “ItemCompany” (Extended datatype is dataAreaId), and relations for “InventTransferTable” table as follows:
* InventTransferTable. TripNo == Trips.TripNo (even it’s already point from the extended datatype)
* InventTransferTable. ItemCompany == Trips.dataAreaId
When inserting records to “InventTransferTable” table, the “ItemCompany” field is somehow set to the company which I want “TripNo” to be fetched from.
I dragged “TripNo” field to some form from “InventTransferTable” table, it’s keep listing values from the existing company and not the company set in “ItemCompany” field.
Did I miss anything or my case does not match the purpose of your post? If you send me an XPO project, that will be amazing
Hi Abdullah,
It looks that I have been trying an example and pointing out another example in my post just to give a clearer picture of what I want to say! It is my mistake.
What I had to mention is that the EDT of the “ItemId” field should NOT have any relation (otherwise that realtion will overwrite).
So to run YOUR example properly, you have to create an EDT that DOES NOT point to any table. And assign this new EDT to the “InventTransferTable.TripNo” field.
And to run MY example properly, I should not select the “ItemId” EDT to my field; I should have created a new EDT that does not point to the “InventTable.ItemId” instead.
Apologies for inconvenience! Thank you so much Abdullah for notifying me.
Thanks Amer it works