problem with Document No. in general journal
yekede
Member Posts: 96
Hi,
I'm trying to insert lines into the general journal through code. My problem is that when the lines are inserted the Document No. is not set automatically (it is empty). What do i do to solve that?
I'm trying to insert lines into the general journal through code. My problem is that when the lines are inserted the Document No. is not set automatically (it is empty). What do i do to solve that?
0
Comments
-
Hi Yekede,
What type of code are you using? DataPorts, XMLPorts or?0 -
Hi Yekede,
Take a look at the function SetUpNewLine in the "Gen. Journal Line" table.
You can use this function to get a new "Document No".
Regards,
ReijerReijer Molenaar
Object Manager0 -
Hi
Thanks for your reply
Erick: I'm using a processing only report.
Reijer:I've tried that but it's giving an error message due to the Onvalidate trigger code of "Balance Account No". this trigger code is called in the function0 -
The Doc no is not always filled in Due to some entries require a manual number entry.
Help Says
If the No. Series field on the journal batch is filled in, the program automatically enters the next number in the series in this field. If the program does not automatically assigns the document number, you must redefine the number series in question.
So check that your Journal has a No series setup so it knows what to insert then add code to your routine to add Doc no from this number series.
** forget to mention your batch should have á balancing account in its setup to work
That could be your solution0 -
Is the "Bal. Account No." valid in you "Gen. Journal Batch"?
What is the errormessage?Reijer Molenaar
Object Manager0 -
Thanks for your reply
The No. Series field is set on the Journal Batch
The Balancing Account field is set on the Journal Batch
When I use the SetupNewLine Function the Document No is filled according to the No Series on Journal Batch Ex:G00011. But when i try to post the journal lines the error message is : 'Document No must be G00010 in Gen. Journal Templte Name.....'
I used the debugger the error is due to the Code() function in Codeunit 13
The Line is: TESTFIELD("Document No.",NoSeriesMgt.GetNextNo(GenJnlBatch."No. Series","Posting Date",FALSE));0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
