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
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.
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!
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?
André Arnaud de Cal...
292,111
Super User 2025 Season 1
Martin Dráb
230,934
Most Valuable Professional
nmaenpaa
101,156