web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Calling The DocuView form in VendinvoiceJournal form

(0) ShareShare
ReportReport
Posted on by 1,447

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

I have the same question (0)
  • Iulian Cordobin Profile Picture
    8,201 on at

    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?

  • DJRM Profile Picture
    1,447 on at

    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
    8,201 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans