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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

call Vendor Lookup Window

(0) ShareShare
ReportReport
Posted on by
I want to call the vendor lookup window from a lookup button on a modified General Transaction Entry Window and populate a vendor ID field using VBA. I added the following code to the lookup button change script but the lookup window is not opening. Am I missing something? Private Sub LookupButton7_Changed() Dim GPApp As New Dynamics.Application Dim ErrMsg As String Dim strCommand As String strCommand = "local PM_VendLookup VendLU." strCommand = strCommand + " set VendLU:'Vendor ID' to 'VendorID' of window TransactionEntry. " + vbNewLine strCommand = strCommand + " set VendLU:'Vendor Name' to "". " + vbNewLine strCommand = strCommand + " set VendLU:'Vendor Class ID' to "". " + vbNewLine strCommand = strCommand + " set VendLU:'Payment Priority' to "". " + vbNewLine strCommand = strCommand + " set VendLU:'User Defined 1' to "". " + vbNewLine strCommand = strCommand + " set VendLU:'Vendor Sort By' to 1. " + vbNewLine strCommand = strCommand + " set VendLU:'Return Value' to 1. " + vbNewLine strCommand = strCommand + " call OpenWindowRet of form Vendor_Lookup, VendLU, 'VendorID' of window TransactionEntry. " + vbNewLine GPApp.ExecuteSanscript strCommand, ErrMsg End Sub

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: call Vendor Lookup Window

    Please have a look on below link.

    blogs.msdn.com/.../avoiding-vba-circular-references-when-using-a-dynamics-gp-lookup.aspx

    Hope this helps!!!

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: call Vendor Lookup Window

    Please follow below article in my blog:

    mohdaoud.blogspot.com/.../how-to-call-gp-lookup-using-vba_1494.html

  • Community Member Profile Picture
    on at
    RE: call Vendor Lookup Window

    Thanks for responding. I followed the method in your article. When the Vendor Lookup window opens, none of the objects in the window are loaded. As you can see from the code my post, I tried the method you used in your follow up article too but the Vendor Lookup window doesn't even open. Now I'm trying to figure out if I'm missing a value that should be passed or if there is an error in my code that is causing the window not to open. I'm not getting any errors so its hard to tell what's wrong.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans