Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Find or create a ledger dimension based on the dimension combination

Posted on by 4,971

Hi,

I am trying to create a line in budget transfer line table. I need to update the LedgerDimension field, based on the known dimension combination. We know the dimension values (Division, Department, Cost center, and Sub cost center).

I found one post but it needs main account. In my case i don't have main account, we know the accounting structure value and dimension values only.

https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/67891/create-a-new-record-in-dimensionattributevaluecombination-by-ax2012-code/191381

Please let me know if you have any idea.

Thanks,

Hari

  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: Find or create a ledger dimension based on the dimension combination

    Great. You helped me in the right time. I found some example by using cross reference.

    Once i get the default dimension value, i need to pass this default dimension value to the BudgetTransacationManager::SaveLedgerDimensionBudget method.

  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: Find or create a ledger dimension based on the dimension combination

    I could not find any example.

    Could you please explain which parameter value i need to pass for the saveLedgerDimensionBudget method?

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: Find or create a ledger dimension based on the dimension combination

    Sorry I didn't realize you were working on the budget module. But my answer has not changed outside the main account part, merge the old dimensions and the new ones

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: Find or create a ledger dimension based on the dimension combination

    I do not know your purpose in development and the situation you are facing, but the ledger dimension to be copied has an account. You can use it.

    Instead of creating a new ledger dimension, you can merge with the values ​​you want to change.

    There is also a white paper as below, I share the relevant part. You can review the document for details.

    "The following methods are used to create budget ledger dimensions:

     saveLedgerDimensionBudget

    Creates a ledger dimension of type budget by using the dimension attribute values from another

    ledger dimension reference. Uses only dimension attributes that are enabled for budget to create

    the budget ledger dimension.

     getLedgerDimensionBudget

    Combines a default account reference for a main account and a default dimension reference into

    one budget ledger dimension. Uses only dimension attributes that are enabled for a budget to

    create the budget ledger dimension.

     mergeDefaultDimWithLedgerDim

    Combines a ledger dimension with a default dimension into one budget ledger dimension. Uses

    only dimension attributes that are enabled for the budget to create the budget ledger dimension."

    download.microsoft.com/.../implementing_budgeting_for_microsoft_dynamics_ax_2012_applications_ax 2012.pdf

  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: Find or create a ledger dimension based on the dimension combination

    The request workflow will go for approval

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Find or create a ledger dimension based on the dimension combination

    Hi Hari,

    Many thanks for the update.

    I just wonder if this is the right process.

    If a user gets a message that he cannot purchase something because of insufficient budget funds, doesn't he have to got to his boss and ask for the budget first?

    If you just do a transfer from another existing budget, wouldn't this allow users basically to order everything without a previous prior approval from their boss?

    I would expect that the boss is accepting / rejecting this and initiates the budget transfer if this is ok with him.

    Not sure if this makes sense in your company environment but that is what I would expect.

    Best regards,

    Ludwig

  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: Find or create a ledger dimension based on the dimension combination

    Hi Ludwig,

    We are creating this form for the EP user. In the purchase requisition time, no budget then user do the the request in the transfer budget form (EP form) with to dimension and from dimension details.

    Please let me know if you have any idea.

    Thanks,

    Hari

  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: Find or create a ledger dimension based on the dimension combination

    Hi Ludwig,

    We are creating transfer budget form for ESS users.

    Thanks,

    Hari

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Find or create a ledger dimension based on the dimension combination

    Hi Hari,

    Why do you need to code that?

    There is a standard budget transfer functionality available that can be used for that purpose.

    Would be great if you could elaborate.

    Many thanks,

    Ludwig

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,274 on at
    RE: Find or create a ledger dimension based on the dimension combination

    If you don't have main account then maybe you need default dimension instead ? Here is an example how to create it community.dynamics.com/.../ax2012-create-default-dimension-with-a-set-of-dimension-values

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans