How to open GP lookup windows through Visual Studio coding?

Most of the developers are refers or using Dexterity for GP development and customization. Visual Studio is one of the development tool which is help us to create addons development, integration and customization in GP. Sometime we need to access standard GP lookup window to return the selected value to custom fields. For this scenario, we can easily achieve this by using dexterity coding.

Example: open form form_name return to field_name of window of form;

Suppose if we want to open a customer lookup window in Visual Studio (C# coding) , we have some addition coding to achieve the same.

Follow below coding to call and return customer lookup window values to custom window field.

Microsoft.Dexterity.Applications.SmartListDictionary.CustomerLookupForm custForm = SmartList.Forms.CustomerLookup;

custForm.CustomerLookup.SelectButton.ClickBeforeOriginal += new CancelEventHandler(CustomerSelectButton_ClickBeforeOriginal);

private void button1_Click(object sender, EventArgs e)


custForm.CustomerLookup.SortBy.Value = 1;



void CustomerSelectButton_ClickBeforeOriginal(object sender, CancelEventArgs e)

string custId = custForm.CustomerLookup.CustomerLookupScroll.CustomerNumber;
textBox1.Text = custId;

Note: The above coding is same for calling all the lookup widow with replacing each of their lookup windows name.

Hope this helps!!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s