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!!!