Announcements
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!
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.
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!
André Arnaud de Cal...
294,206
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator