Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012
Data Import, Export, and Migration
Upgrading to Microsoft Dynamics AX 2012
Microsoft Dynamics AX 2009
Application Object Server (AOS)
Enterprise Portal and Role Centers
SSRS and SSAS Integration
I have 3 switch cases in there (1 is for null), however, only 1 is getting reached which ends up not defaulting the right mapping for Staging to Target.
Any idea why it doesn't call my getReturnFields more than once?
I figured it out.
When dealing with DMF Entities, the Field Groups that are associated with the Methods in the EntityClass should be unique in that their fields shouldn't be the same. I had ItemId in each of my field groups.
Can you post the code here and explain which part is not reached?
My blog | PBC
This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
case methodStr(DMFInventItemPurchSetupDOSEntityClass, GenerateInventDimId) :
con += [fieldstrToTargetXML(fieldStr(InventItemPurchSetup, InventDimId), purchSetupDataSourceName)];
con += [fieldstrToTargetXML(fieldStr(InventItemInventSetup, InventDimId), inventSetupDataSourceName)];
con += [fieldstrToTargetXML(fieldStr(InventItemSalesSetup, InventDimId), salesSetupDataSourceName)];
case methodStr(DMFInventItemPurchSetupDOSEntityClass, GenerateInventDimIdDefault) :
con += [fieldstrToTargetXML(fieldStr(InventItemPurchSetup, InventDimIdDefault), purchSetupDataSourceName)];
con += [fieldstrToTargetXML(fieldStr(InventItemInventSetup, InventDimIdDefault), inventSetupDataSourceName)];
con += [fieldstrToTargetXML(fieldStr(InventItemSalesSetup, InventDimIdDefault), salesSetupDataSourceName)];
con = conNull();
The second case for GenerateInventDimIdDefault is not reached.
Because of the 'break'-statement other case statements are not executed. In this scenario you can delete this statement to have all case statements evaluated.
See also this link: msdn.microsoft.com/.../aa607181.aspx
André Arnaud de Calavon | Microsoft Dynamics AX Solution architect | My blog | My company
This post is my own opinion and does not necessarily reflect the opinion or view of my company, Microsoft, both its employees, or other MVPs.
There should be a break. the 'getReturnFields' method inside the DMFEntityClass should be called for each 'Generate' method you have. It is only being called once for my entity. Removing the break is not what should happen.
Thanks for sharing your solution. I never guessed you made the mistake in the field groups...
Yeah... Simple mistake, however, I had no idea it would cause a problem.
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics