Click or drag to resize

ConneXionFindCompaniesByCriteria Method

Finds the companies by criteria.

Namespace:  ConneXion
Assembly:  ConneXion (in ConneXion.dll) Version: 2020.0
Syntax
public ConneXionResult FindCompaniesByCriteria(
	Company oCompany,
	ref Company[] oCompanies
)

Parameters

oCompany
Type: ConneXionCompany
Company object to Find.
oCompanies
Type: ConneXionCompany
List of Companies

Return Value

Type: ConneXionResult
ConneXionResult.
Remarks

Required Fields

  • TAMUserName
  • TAMPassword
  • TAMCentralAgency - only if agency is on AppliedOnline
  • LicenseKey - only if agency is an Agency of Vendor

Available Search Criteria

  • RecordNumber
  • MaxCount
  • Attention
  • City
  • Fax
  • Name
  • Note
  • Phone
  • State
  • Street
  • Street2
  • Tag
  • ZipCode

MaxCount: This field limits the number of records returned when calling FindCompaniesByCriteria to avoid time out issues. Once MaxCount is set, additional code can be added to see if there are additional records to be returned and loop thru those records.

Examples
VB
Dim oConneXion As New ConneXion.ConneXion
Dim oCompany As New ConneXion.Company
Dim oCompanies() As ConneXion.Company
Dim oResult As ConneXion.ConneXionResult

oCompany.TAMUserName = "EXEC"
oCompany.TAMPassword = "PSWD"
oCompany.Name = "Gr"
oCompany.MaxCount = 2
oResult = oConneXion.FindCompaniesByCriteria(oCompany, oCompanies)

If oResult.Success Then
    txtResult.Text = oResult.Description
    dgrdResult.DataSource = oCompanies
Else
    txtResult.Text = "Number: " & oResult.Number & vbCrLf & "Desc: " & oResult.Description & vbCrLf & "TAMErrorNumber: " &
     oResult.TAMErrorNumber & vbCrLf & "TAMErroDesc: " & oResult.TAMDescription
End If
See Also