-1

i need to create DimensionAttributeSetStorage items by DefaultDimension field (CustTable.DefaultDimension for example).
How can i do this?

Sky
  • 11

1 Answers1

1

On the form use DimensionDefaultingController.

Also see Implementing the Account and Financial Dimensions Framework AX2012 White Paper (http://download.microsoft.com/download/4/E/3/4E36B655-568E-4D4A-B161-152B28BAAF30/Implementing_the_Account_and_Financial_Dimensions_Framework_AX2012.pdf).


If you need to create default dimension from the code you can use the DMFDimensionHelper::generateDefaultDimension method.

Sample:

DMFDataSourceProperties sourceProperties;
sourceProperties.ChartOfAccountsDelimiter = DimensionLedgerAccountDelimiter::Hyphen;
sourceProperties.DimensionAttribute = "Dim1-Dim2"; // dimension codes

x.DefaultDimension = DMFDimensionHelper::generateDefaultDimension("001-ABC", sourceProperties, "");
Matej
  • 7,517
  • 2
  • 36
  • 45
  • This sample code relies on the data migration framework, which isn't the same or installed in all versions of AX...for anyone who may stumble upon it. – Alex Kwitny Jun 05 '15 at 03:37