NEW2.02.03 · Released 4 December 2014
NEWfinPOWER Connect
Released in
2.02.03
4 December 2014
- Opened25 Nov
- Closed26 Nov
- Released4 Dec
Article 12460
Job J014523
Page Sets; Ability to show Company Lookup form added
Page Sets can now display the Company Lookup form (as per the Clients form and the New Client wizard).
The following code sample will display a company lookup:
Public Sub txtCompany_ButtonClick(sender As Object, e As finPageObjectButtonClickEventArgs) Handles txtOrganisationName.ButtonClick, txtCompanyNumber.ButtonClickDim ExistingDetails As ISKeyValueListDim DetailsToUpdate As ISKeyValueListDim Results As ISKeyValueListDim SearchBy As isefinCompanyLookupSearchByDim SearchQuery As StringExistingDetails = finBL.CreateKeyValueList()With ExistingDetails.SetString("CompanyName", txtOrganisationName.Text).SetString("CompanyNumber", txtCompanyNumber.Text)End WithIf sender Is txtOrganisationName ThenSearchBy = isefinCompanyLookupSearchBy.CompanyNameSearchQuery = txtOrganisationName.TextElseSearchBy = isefinCompanyLookupSearchBy.CompanyNumberSearchQuery = txtCompanyNumber.TextEnd IfIf psh.FormShowCompanyLookup(SearchBy, SearchQuery, Results, ExistingDetails, DetailsToUpdate) ThenIf Results Is Nothing ThenmUI.MsgBox("Cancelled by User.", MsgBoxStyle.Information)Else' Update fields based on selected values (could use Results instead if we're not worried about what the User selected)If DetailsToUpdate.Exists("CompanyName") Then txtOrganisationName.Text = DetailsToUpdate.GetString("CompanyName")If DetailsToUpdate.Exists("CompanyNumber") Then txtCompanyNumber.Text = DetailsToUpdate.GetString("CompanyNumber")End IfElsemUI.ErrorMessageShow()End IfEnd Sub
Company Lookup is only available if licensed for the Credit Enquiry Add-On and is currently implemented for Australia and New Zealand.
The new method, FormShowCompanyLookup is documented in the Page Sets documents. A new section has been added: Advanced Scripting, Showing Special Forms, Company Lookup.