Generate Document No In Gen Journal Lines 81

jsshivalik
Member Posts: 67
Hi
Gen. Journal Line - OnAfterImportRecord()
"Journal Template Name":='GENERAL';
"Journal Batch Name":='TEST';
"Source Code":='GENJNL';
"Posting No. Series":='JV';
"Line No.":="LineNo."+1000;
Below is the Data. I want if 2 rows no is same then same Document No should be generated . For e.g 2&3 in below case. Is it possible or Document No generated is different for each row.
08.06.2017 Invoice 1 Vendor V000001
08.06.2017 Invoice 2 Vendor V000001
08.06.2017 Invoice 2 Vendor V000001
08.06.2017 Invoice 3 Vendor V000002
08.06.2017 Invoice 3 Vendor V000002
08.06.2017 Invoice 4 Vendor V000003
Thanks
Gen. Journal Line - OnAfterImportRecord()
"Journal Template Name":='GENERAL';
"Journal Batch Name":='TEST';
"Source Code":='GENJNL';
"Posting No. Series":='JV';
"Line No.":="LineNo."+1000;
Below is the Data. I want if 2 rows no is same then same Document No should be generated . For e.g 2&3 in below case. Is it possible or Document No generated is different for each row.
08.06.2017 Invoice 1 Vendor V000001
08.06.2017 Invoice 2 Vendor V000001
08.06.2017 Invoice 2 Vendor V000001
08.06.2017 Invoice 3 Vendor V000002
08.06.2017 Invoice 3 Vendor V000002
08.06.2017 Invoice 4 Vendor V000003
Thanks
0
Answers
-
In my case the Invoicenumber is transfered to the field "External Document No."
In the next lines this field is checked.IF GenJnlBatch."No. Series" <> '' THEN BEGIN GenJnlLine.RESET; GenJnlLine.SETRANGE("Journal Template Name","Journal Template Name"); GenJnlLine.SETRANGE("Journal Batch Name","Journal Batch Name"); GenJnlLine.SETRANGE("External Document No.", "Invoice No."); IF NOT GenJnlLine.FINDFIRST THEN DocumentNo := NoSeriesMgt.GetNextNo(GenJnlBatch."No. Series", "Posting Date",FALSE); ELSE DocumentNo := GenJnlLine."Document No.";
1 -
Hi
This code should be written under which Trigger. In the above code Document No will be Generated before Post. Can Vendor have same External Document No for more han 1 record.
I am Uploading Data for Gen Journal Lines table 81.
What is GenJnlBatch."No. Series"
Thanks0 -
Trigger is OnAfterImportRecord.
If PurchSetup."Ext. Doc. No. Mandatory" = FALSE then the vendor can have multiple times the same "External Document No."
In your case the GenJnlBatch."No. Series" is the same as "Posting No. Series":='JV';1 -
Hi
I have written like this . Is it ok It is generation Document no for each line
"Journal Template Name":='GENERAL';
"Journal Batch Name":='test';
"Posting No. Series":='JV';
"Line No.":=GetLineNumber;
"Document No.":= NoSeriesMgt.GetNextNo("Posting No. Series", "Posting Date",FALSE);
How does this works
NoSeriesMgt.GetNextNo("Posting No. Series", "Posting Date",FALSE);
Can u pls help according to my data . What changes i need to do in above code
08.06.2017 Invoice 1 Vendor V000001
08.06.2017 Invoice 2 Vendor V000001
08.06.2017 Invoice 2 Vendor V000001
08.06.2017 Invoice 3 Vendor V000002
08.06.2017 Invoice 3 Vendor V000002
08.06.2017 Invoice 4 Vendor V000003
2,3 should have same Document No . In Dataport this field is Document No
Thanks0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions