Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7169805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:05:04+00:00 2026-05-28T15:05:04+00:00

My problem is setting some dimension values read from an external source. Given the

  • 0

My problem is setting some dimension values read from an external source.

Given the AX 2009 statement:

ledgerJournalTrans.Dimension    = ledgerTable.Dimension;
ledgerJournalTrans.Dimension[1] = "abc";

What is the equivalent way to that in AX 2012?

This will of cause assume the existence of a “Department” dimension as the first dimension.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:05:05+00:00Added an answer on May 28, 2026 at 3:05 pm

    First things first, the legacy dimensions in AX 2009 have been completely redone and replaced in AX 2012. The new LedgerDimension are a combination of the account and the old dimension values that are needed based on the account structure and advanced rule structures. To find out more about the new Dimension Framework in AX 2012 try reading the whitepaper about the new dimension framework.

    Assuming that Department is the first dimension and that both dimensions are using the LedgerDimensionAccount EDT simplifies this scenario quite a bit, but the new dimension framework is very flexible so this assumption may not be correct. Even if it is, simply specifying a new value for Department may require that the structure of the combination needs to change drastically because of advanced rule structures that can be setup.

    Honestly, I would only consider the code below as just a demonstration how some of the basics work, not something that should be used in production. With that said, this code should accomplish what you want, if that Dimension field on LedgerTable has be replaced with a LedgerDimension field using the LedgerDimensionAccount EDT which stores a full combination.

    DimensionStorage dimensionStorage;
    DimensionAttribute deparmentDimensionAttribute;
    DimensionAttributeValue newDepartmentValue;
    
    // Find the deparment dimension attribute
    deparmentDimensionAttribute = DimensionAttribute::findByName("Department");  
    
    // Find the new department value we want to put in the new combination.
    newDepartmentValue = DimensionAttributeValue::findByDimensionAttributeAndValue(deparmentDimensionAttribute, "abc");
    
    // Load a DimensionStorage instance with the old combination and update the first segment with new value
    dimensionStorage = DimensionStorage::findById(ledgerTable.LedgerDimension);
    dimensionStorage.setSegment(1,DimensionStorageSegment::constructFromValue("abc", newDepartmentValue));
    ledgerJournalTrans.LedgerDimension = dimensionStorage.save();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem setting the Authorize attribute Role value from a variable.
I have a problem with setting Browsing Path in Delphi 2009: When I install
I am setting up some monitoring on some Windows infrastructure and am having problem
I've run into a strange problem: when setting values of the DWORD type in
I'm having some problem setting up an oauth provider with two-legged authentication. I'm using
I found a strange problem when I used class Generics Today: Setting some broke
I've read quite a few different ways to tackle the problem of setting the
Facing some problem in setting up future date. Actually I m trying to do
I'm having a problem setting a cookie and doing a 302 redirect In chrome
I am having a problem setting up the following in Visual Studio 2008: a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.