HOWTO: Configure posted purchase receipt record linking for posted purchase invoices
ZTN4176
ID: ZTN4176
This Zetadocs technical note applies to:
- Version 5.0 of Zetadocs for NAV
Summary
This technote describes how to configure record linking of posted receipts for posted invoices in Microsoft Dynamics NAV. This allows you to view the list of related documents, of a given posted receipt, from the corresponding posted invoice in NAV.
More information
To configure record linking follow the steps below:
1. Modifying the Purchase Invoice Line table.
- Launch Dynamics NAV Classic Client and open the Object Designer (Shift + F12).
- Design the table: 123 – Purch. Inv. Line.
- Add the following new field to the table:
- Field No. 50000
- Field Name Posted Purch. Rcpt. Line No.
- Data Type Code
- Length 20
2. Adding a new Zetadocs mapping.
- Run the table: 9041213 – Zetadocs Record Mapping Header
- Add the following new entry:
- Mapping ID < Next available number>
- Mapping Type Live
- Source Table 123
- Target Table 120
- Mapping Description Posted Purchase Invoice Line -> Posted Purchase Receipt
- Source Table Name Purch. Inv. Line
- Target Table Name Purch. Rcpt. Header
- Mapping ID < Same value as entered in the previous table above>
- Line ID 1
- Source Field 50000
- Target Field 3
- Target Value < Blank>
3. Update the Post process.
- Design the codenunit 90 - Purch.-Post
- Search for the following line :
// Insert invoice line or credit memo line - Between the line above and right before the following line:
PurchInvLine.INSERT - Add the following code:
//-------------------
IF (PurchLine." Receipt No." < > '') THEN
BEGIN
PurchInvLine." Posted Purch. Rcpt. Line No." := PurchLine." Receipt No."
END;
//------------------- - Close the form, save and compile.
Validation
To validate the configuration, perform the following:
- From the NAV Classic Client, browse to Purchase > Order Processing > Orders.
- Create a new Purchase Order (F3) containing several items.
- Open the Zetadocs Archive (Shift + Ctrl + A or browse to Order > Zetadocs Archive).
- Drag and drop several documents to link to the order.
- Post the purchase order receipt only: Select Posting > Post.. > Receive.
- Open the corresponding posted receipt: Browse to Purchase > History > Posted Receipts and select the corresponding receipt.
- Add other documents to the receipt from the Zetadocs Archive form (Shift + Ctrl + A).
- Create a new Purchase Invoice: Purchase > Order Processing > Invoice and select the same Buy-From Vendor No.
- Obtain the receipt items by going to Functions > Get Receipt Lines and selecting the lines from the corresponding receipt number.
- Additionally, drag and drop some documents to the invoice from the Zetadocs Archive form.
- Post the invoice: Posting > Post and confirm.
- Browse to the corresponding Posted Purchase Invoice: Purchase > History > Posted Invoices.
- Verify the posted invoice contains the related documents from the Zetadocs Archive.
Last updated: 18th April 2012 (SD/MW)