Repeat of External Doc. No.

Our Client uses Navision 3.60 A. They sometimes use the same External Document No. on more than one Sales Order. They were able to do this in Fin 2.0 version. In 3.60 A, codeunit 12 Gen. Jnl.-Post Line does not allow this. The code for this can be found under the comments “//Check the document no.” in that codeunit. If I comment this part out so that it will allow posting of customer ledger entries with the same External Document No., what are the adverse effects? This should not stop them from applying payments to the right sales invoices etc. Can anyone please let me know if there are any adverse effects? TIA

I have done this mod for a couple of customers and I have not experienced any problems at all! Why this feature is in standard Navision? Beats me too!

In the french version of Navision, we have a specific parameter in Sales & Receivables Setup to control or not ‘unique document external no’. Therefore, i think there’s no problem to do that In Table 311, we have Field ID 70001 / Single Ext. Doc. No. / Boolean In codunit 12, we have : // Check the document no. IF “Recurring Method” = 0 THEN IF “Document Type” IN [“Document Type”::Invoice, “Document Type”::“Credit Memo”, “Document Type”::“Finance Charge Memo”, “Document Type”::Reminder] … IF SalesSetup.“Ext. Doc. No. Mandatory” OR (CVLedgEntryBuf.“External Document No.” <> ‘’) THEN BEGIN // Test Customer number TESTFIELD(“External Document No.”); OldCustLedgEntry.RESET; OldCustLedgEntry.SETCURRENTKEY(“Document Type”,“External Document No.”,“Customer No.”); OldCustLedgEntry.SETRANGE(“Document Type”,CVLedgEntryBuf.“Document Type”); OldCustLedgEntry.SETRANGE(“External Document No.”,CVLedgEntryBuf.“External Document No.”); OldCustLedgEntry.SETRANGE(“Customer No.”,CVLedgEntryBuf.“CV No.”); IF (OldCustLedgEntry.FIND(’-’)) AND (SalesSetup.“Single Ext. Doc. No.”) THEN ERROR( Text007, CVLedgEntryBuf.“Document Type”,CVLedgEntryBuf.“External Document No.”); END; END; --------------- where Text007=ENU,“Sales %1 %2 already exists for this Customer.”) Best regards Patrick

Be VERY careful about what you comment out in Codeunit 12 though, that is where most financial data gets posted, and you will have a very upset customer if you screw up that particular codeunit. If you don’t know exactly what you are doing, you should have a certified Navision developer do this for you.

Thank you all for your help.