PRB: Related documents not refreshed when navigating to previous or next record in NAV 2013
Print
ZTN4231
ID: ZTN4231
This Zetadocs technical note applies to:
- Zetadocs Express
- Version 5.0 of Zetadocs for NAV Platform Feature Pack
- Microsoft Dynamics NAV 2013
Symptom
When viewing a page in NAV 2013, which has been marked up for use with Zetadocs for NAV, when using Ctrl + Page Up/Page Down or the navigation actions on the ribbon to change records the related documents factbox does not refresh it’s list of related documents. This can leave the page displaying related documents for the wrong record.
Cause
This issue appears to be due to an optimization in NAV 2013 where the factbox is not refreshed when the record being viewed changes.
The customer and vendor card pages are examples of where this issue occurs.
Resolution
The resolution to this problem is to make the adjustment, highlighted in bold below, to the standard page modifications:
- Open the object designer (Shift + F12) and select the page that needs to be modified and click the Design button, in this example we will be looking at the Employee card.
- Add the following entry at the top of the Factbox area.
Name: Zetadocs
Caption: Documents
Type: Part
Subtype: Page
- Once you’ve added the line, select it and open the properties for it (shift+F4).
- Scroll down to the PagePartID field and select Zetadocs Rel. Docs. Page Part, ID:9041209.
- Close the Properties dialog.
- Click View > C/AL Code or press F9 to open the C/AL Editor, scroll down to the OnAfterGetRecord section, click inside that section and then select View > CA/L Locals.
- Select the Variables tab and create a new variable with the values:
Name: ZdRecRef
DataType: RecordRef
- Close the CA/L Locals dialog.
- Return to the OnAfterGetRecord section and enter the following:
ZdRecRef.GETTABLE(Rec);
IF ZdRecRef.GET(ZdRecRef.RECORDID) THEN
BEGIN
CurrPage.Zetadocs.PAGE.SetRecordID(ZdRecRef.RECORDID);
CurrPage.Zetadocs.PAGE.ACTIVATE(TRUE);
END;
- The Document Factbox can now be used in the NAV 2013 Windows client (RTC).
Status
This has been identified by Equisys as a problem with the software versions given above.
Last updated: 30/01/2013 (JW/MW)