Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Function DimensionVali...
Finance forum

Function DimensionValidationRequest::newForLedgerDimensionType has been incorrectly called.

(0) ShareShare
ReportReport
Posted on by 105

I need to create a Vend Invoice Journal from code.

I have tried creating it using the VendInvoiceJournalHeaderEntity and VendInvoiceJournalLineEntity. I need the user to validate the Journal in the form. The Journal seems all right but when you validate the Journal I get this error:  "Voucher CCH-000000108ARG Message details Function DimensionValidationRequest::newForLedgerDimensionType has been incorrectly called."

I am using a Vendor type account. If you cut the Account from the form and paste it again and then validate the Journal it validates!

What could it be wrong? Any will be appreciated!

  • Community Member Profile Picture
    on at
    RE: Function DimensionValidationRequest::newForLedgerDimensionType has been incorrectly called.

    Hello Emmilio,

    When i use entity instead of ledgerjournalTrans it gives following error:

    The number of dimension values specified in 110110-- is different from the number set up in the active format for data entities

    Can you please tell me how to place Main account in ledgerJournalEntity.AccountDisplayValue?

    I'm using the following code:

    ledgerJournalEntity.AccountDisplayValue    = LedgerDimensionFacade::getDisplayValueForLedgerDimension ( LedgerDimensionFacade::serviceCreateLedgerDimension(CustParameters::find().PUIExpenseAccount, 0));

    Thank you.

  • Verified answer
    Emilio Molina Profile Picture
    105 on at
    RE: Function DimensionValidationRequest::newForLedgerDimensionType has been incorrectly called.

    I just realize that the problem was that after creating the journal I was updating some data using the ledgerJournalTrans instead of the VendInvoiceJournalLineEntity. I just notice that if the journal is created using the table instead of the entity it causes the same problem. Weird thing is that I have always used the table for creating general journals without any problem. Guess is just better to use entity instead.

    Hope this helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,206 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,968 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans