Ext.Doc.No. mandatory while reversing the Prepayment Invoice

sneha
Member Posts: 191
I posted a prepayment invoice. Now I want to reverse the prepayment invoice.
From the PO, I clicked on “Post Prepayment Credit Memo “. System throwing the below error message
You must Specify External. Document No. in Gen. Journal Line Journal Template Name = ‘’, Journal Batch Name=’’, Line No. =’0’
I understand above error message is because “Ext. Doc. No. Mandatory” is checked in P&P Setup and below code in codeunit 12
IF PurchSetup."Ext. Doc. No. Mandatory" OR
(CVLedgEntryBuf."External Document No." <> '')
THEN BEGIN
// Test vendor number
TESTFIELD("External Document No.");
OldVendLedgEntry.RESET;
IF NOT RECORDLEVELLOCKING THEN
OldVendLedgEntry.SETCURRENTKEY("External Document No.");
OldVendLedgEntry.SETRANGE("External Document No.",CVLedgEntryBuf."External Document No.");
OldVendLedgEntry.SETRANGE("Document Type",CVLedgEntryBuf."Document Type");
OldVendLedgEntry.SETRANGE("Vendor No.",CVLedgEntryBuf."CV No.");
IF NOT OldVendLedgEntry.ISEMPTY THEN
ERROR(
Text003,
CVLedgEntryBuf."Document Type",CVLedgEntryBuf."External Document No.");
END;
Based on the given help message, we don’t want to take out the “Ext. Doc. No. Mandatory” from P&P Setup.
Ext. Doc. No. Mandatory Field The Purchases & Payables Setup Table
Here you can specify whether it is mandatory to enter an external document number in the following situations:
in the Vendor Invoice No. field or the Vendor Cr. Memo No. field on a purchase header
in the External Document No. field on a general journal line, where the contents of the Document Type field = Invoice, Credit Memo or Finance Charge and the contents of the Account Type field = Vendor.
If you place a check mark in this field, it will not be possible to post an invoice, a credit memo or the type of general journal line described above without an external document number.
In which field I have to enter the data to bypass the above code?
----Edit---
Sorry, I confused. I was looking for "Ext. Doc. No. field in Purchase Header. I need to fill up "Vendor Cr. Memo No."
From the PO, I clicked on “Post Prepayment Credit Memo “. System throwing the below error message
You must Specify External. Document No. in Gen. Journal Line Journal Template Name = ‘’, Journal Batch Name=’’, Line No. =’0’
I understand above error message is because “Ext. Doc. No. Mandatory” is checked in P&P Setup and below code in codeunit 12
IF PurchSetup."Ext. Doc. No. Mandatory" OR
(CVLedgEntryBuf."External Document No." <> '')
THEN BEGIN
// Test vendor number
TESTFIELD("External Document No.");
OldVendLedgEntry.RESET;
IF NOT RECORDLEVELLOCKING THEN
OldVendLedgEntry.SETCURRENTKEY("External Document No.");
OldVendLedgEntry.SETRANGE("External Document No.",CVLedgEntryBuf."External Document No.");
OldVendLedgEntry.SETRANGE("Document Type",CVLedgEntryBuf."Document Type");
OldVendLedgEntry.SETRANGE("Vendor No.",CVLedgEntryBuf."CV No.");
IF NOT OldVendLedgEntry.ISEMPTY THEN
ERROR(
Text003,
CVLedgEntryBuf."Document Type",CVLedgEntryBuf."External Document No.");
END;
Based on the given help message, we don’t want to take out the “Ext. Doc. No. Mandatory” from P&P Setup.
Ext. Doc. No. Mandatory Field The Purchases & Payables Setup Table
Here you can specify whether it is mandatory to enter an external document number in the following situations:
in the Vendor Invoice No. field or the Vendor Cr. Memo No. field on a purchase header
in the External Document No. field on a general journal line, where the contents of the Document Type field = Invoice, Credit Memo or Finance Charge and the contents of the Account Type field = Vendor.
If you place a check mark in this field, it will not be possible to post an invoice, a credit memo or the type of general journal line described above without an external document number.
In which field I have to enter the data to bypass the above code?
----Edit---
Sorry, I confused. I was looking for "Ext. Doc. No. field in Purchase Header. I need to fill up "Vendor Cr. Memo No."
0
Comments
-
You will have to enter a value in the External Document Number field.0
-
I know this is a really old post, but I received this error when testing a fix from MS for prepayments.
The error is misleading because there is no External Document No. field in the Purchase Header. It is really looking for you to specify a value in the Vendor Cr. Memo No. field, which is not shown by default in the Purchase Header.
Hope this helps save someone time in the future.0
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