Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

GP lookup button in Visual Studio form

(0) ShareShare
ReportReport
Posted on by 250

Good Morning,

I am using Visual Studio tools for GP 10. I have a form in Visual Studio and I need a lookup button that can look up GP Customers. I know how to open the CustomerLookup window [CustomerLookupWindow.Open()] but I can't figure out how to retrieve the value of the customer ID that is selected. In Dexterity I would usually do this:
open form Customer_Lookup return to 'Customer Number';

How can I implement something similar in VS?

 Thank You,

Roaa

*This post is locked for comments

  • Dave Dusek Profile Picture
    Dave Dusek on at
    Re: Re: GP lookup button in Visual Studio form

    Ok, here is another suggestion.  In the GP SDK, there is a document installed called lookup.doc.  That document contains informaton on many of the lookups in GP, including the Batch Lookup.  In that document, go to page 11, that has the Batch Lookup window.  Here you will see how to call that lookup window from Dexterity.  You have to do something similar with VSTools.  Look at that and see if that helps you.  Basically, you have to call the INITIALIZE of form Batch_Lookup to make the window initialize.  

  • k@vi Profile Picture
    k@vi 430 on at
    Re: Re: GP lookup button in Visual Studio form

    Thous samples are not helpful for me...Can you give any more suggestions...........

  • Dave Dusek Profile Picture
    Dave Dusek on at
    Re: Re: GP lookup button in Visual Studio form

    That is the full path but if you can't get there, go to the main customersource page and search on "Developer Toolkit Sample Applications for Microsoft Dynamics GP 10.0" and you should be able to find id.

  • k@vi Profile Picture
    k@vi 430 on at
    Re: Re: GP lookup button in Visual Studio form

    Can you please provide full path for that link.....i can't able to open that.....

  • Dave Dusek Profile Picture
    Dave Dusek on at
    Re: Re: GP lookup button in Visual Studio form

    We do have a lookups sample application that you can get from:

    mbs.microsoft.com/.../developertoolkitsampleapplicationsformicrosoftgp10.htm toolkit

    This has some of the common lookup windows.  Even if it doesn't have the one you are looking for, it still will be helpful on the technique to handle the lookup from VSTools.  

    Dave Dusek

  • k@vi Profile Picture
    k@vi 430 on at
    Re: Re: GP lookup button in Visual Studio form

    Hi All, i am trying to open Batch id form using look up button :

    private void lbl_Lookup_Click(object sender, EventArgs e)

    {

    Microsoft.Dexterity.Applications.SmartListDictionary.BatchLookupForm batchlookup = SmartList.Forms.BatchLookup;

    batchlookup.Open();

    }

    .. Am getting only one option..i.e invoice entry ..but i have to get General entry instead of invoice entry....Option...Can you please give any ideas ...for getting General entry.... Thanks in advance...

  • Roaa Bahran Profile Picture
    Roaa Bahran 250 on at
    Re: GP lookup button in Visual Studio form

    Ok I solved the problem.

    Basically I added a trigger to the Select Button of the Customer Lookup window that will return the Customer Number from the scrolling window into the field on my window. I might have to add some code later on to only do this if my window is actually open.

    CustLookup.SelectButton.ClickAfterOriginal += new EventHandler(CustLookupSelectBtnClicked);

    void CustLookupSelectBtnClicked(object sender, EventArgs e)
            {
                if (CustLookupScroll.CustomerNumber != null)
                {
                    MyField.Text = CustLookupScroll.CustomerNumber.Value;
                }
            }

    Roaa

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans