SBX - Search With Button

SBX - Forum Post Title

ZetaDocs in Archived documents

Microsoft Dynamics NAV Forum

SamCha asked a question on 16 Apr 2018 12:49 PM
My Badges

Question Status

Verified

We have ZetaDocs working for Purchase Orders, and I wanted to have them on the Purchase Order Archive too.

I used this code in the Purchase Order Archive form, OnAfterGetrecord:

ZdPO."Document Type" := Rec."Document Type";
ZdPO."No." := Rec."No.";
ZdRecRef.GETTABLE(ZdPO);
CurrPage.Zetadocs.PAGE.SetRecordID(ZdRecRef.RecordID);
CurrPage.Zetadocs.PAGE.ACTIVATE(true);


It works, but only for archived POs that still exist in Purchase Header... any ideas on how to make it work even if the Purchase Header doesn't exist anymore?

Reply
SamCha responded on 16 Apr 2018 1:21 PM
My Badges

Found out while debugging that ZetaDocs add-in CodeUnit does a get and exits if the Get doesn't work.

That's really unfortunate... and I can't change that code it says I do not have access.

Any ideas?

Reply
Suresh Kulla responded on 16 Apr 2018 1:26 PM

The Purchase Order Archive has key of Document Type,No.,Doc. No. Occurrence,Version No.

So you need to Doc. No. Occurrence, Version No.  on the ZdPO,

Reply
SamCha responded on 16 Apr 2018 1:29 PM
My Badges

ZdPO is a Purchase Order Header, not a Purchase Order Archive.

Reply
SamCha responded on 16 Apr 2018 2:56 PM
My Badges
Verified Answer

Did a big hack where if the PO header doesn't exists I create it on the page open and delete it back on page close...

Reply
SamCha responded on 16 Apr 2018 2:56 PM
My Badges
Verified Answer

Did a big hack where if the PO header doesn't exists I create it on the page open and delete it back on page close...

Reply

SBX - Two Col Forum

SBX - Migrated JS