Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Calling The DocuView form in VendinvoiceJournal form

(0) ShareShare
ReportReport
Posted on by 1,445

Hi all,

How do I call the docuView form in VendInvoiceJournal form? Basically what I want to acheive is to open the DocuView to show the related Purchase Order attachements. I already have a menu item that has this "clicked" method:

DocuRef docuRef;
    Args args = new Args();
    FormRun formRun;

    select * from docuRef where docuRef.RefRecId == _purchTable.RecId &&
    docuRef.RefCompanyId == _purchTable.dataAreaId &&
    docuRef.RefTableId == _purchTable.TableId;
    //docuRef::find(_purchTable.dataAreaId, _purchTable.RecId, false)
    args.name(formStr(DocuView));
    args.record(docuRef);
    args.parm(int642str(docuRef.RecId));
    args.caller(this);

    formRun = classFactory.formRunClass(args);
    formRun.init();
    formRun.run();
    formRun.wait();
    new MenuFunction(menuitemDisplayStr(DocuView), MenuItemType::Display).run(args);
    docuRef::openDocHandling(docuRef, this);


As you can see, I tried different approaches but none of them works. Any help would be greatly appreciated. Thanks.

*This post is locked for comments

  • Iulian Cordobin Profile Picture
    Iulian Cordobin 8,201 on at
    RE: Calling The DocuView form in VendinvoiceJournal form

    Yes, I was asking if on this particular form (the VendInvoiceJournal form) do you have the Document handling button active and usable? Because if you have that one enabled, then getting a new menu item on the form to open the DocuView form should be fairly simple.

  • DJRM Profile Picture
    DJRM 1,445 on at
    RE: Calling The DocuView form in VendinvoiceJournal form

    Hi,

    Yes we are using that, but the client wants to use the functionality of that button in another form for example, the Invoic Journal form.

    I already have a menu item button that tries to call the DocuView form. But FormRun and Args.record() doesn't work.

    Would you like to help me on this one ? thanks a lot!

  • Iulian Cordobin Profile Picture
    Iulian Cordobin 8,201 on at
    RE: Calling The DocuView form in VendinvoiceJournal form

    Hi.

    First of all, the question is can't you use the standard Document handling button (the one located in the Status bar, left side, next to the navigation buttons)? Is that one not enabled?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,111 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,934 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans