Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012
Upgrading to Microsoft Dynamics AX 2012
Data Import, Export, and Migration
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 posting is provided "AS IS" with no warranties, and confers no rights.
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
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