 |
ConneXionFindProducersByCriteria Method |
Used to Find Producer by criteria.
Namespace:
ConneXion
Assembly:
ConneXion (in ConneXion.dll) Version: 2020.0
Syntaxpublic ConneXionResult FindProducersByCriteria(
Producer oProducer,
ref Producer[] oProducers
)
Public Function FindProducersByCriteria (
oProducer As Producer,
ByRef oProducers As Producer()
) As ConneXionResult
Parameters
- oProducer
- Type: ConneXionProducer
oProducer data object to Find - oProducers
- Type: ConneXionProducer
List of producers.
Return Value
Type:
ConneXionResultConneXionResult
RemarksRequired 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
Note |
---|
MaxCount: This field limits the number of records returned when calling FindProducersByCriteria 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.
|
ExamplesDim oConneXion As New ConneXion.ConneXion
Dim oResult As New ConneXion.ConneXionResult
Dim oProducer As New ConneXion.Producer
Dim oProducers() As ConneXion.Producer
oProducer.TAMUserName = "EXEC"
oProducer.TAMPassword = "PSWD"
oProducer.TAMCentralAgency = "DEMOAG1"
oProducer.LicenseKey = "1234567 1"
oProducer.State = "IL"
oResult = oConneXion.FindProducersByCriteria(oProducer, oProducers)
If oResult.Success = False Then
MsgBox("FindProducersByCriteria is false")
Else
MsgBox("FindProducersByCriteria is successful")
End If
Examples'This field limits the number Of records returned When calling FindProducersByCriteria 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 through those records.
'Sample code Is below
Dim oConnexion As New ConneXion.ConneXion
Dim oResult As New ConneXion.ConneXionResult
Dim oProducer As New ConneXion.Producer
Dim oProducers() As ConneXion.Producer
oProducer = New ConneXion.Producer
oProducer.TAMUserName = "EXEC"
oProducer.TAMPassword = "PSWD"
oProducer.TAMCentralAgency = "DEMOAG1"
oProducer.LicenseKey = "1234567 1"
oProducer.State = "CA"
oProducer.MaxCount = 10
'This method will now return, at the most, 10 Producers
oResult = oConnexion.FindProducersByCriteria(oProducer, oProducers)
'Now we'll continue determining if there are more sets to be obtained
'If the current Producer count Is what MaxCount Is Set To Then we know there can be more
Do While UBound(oProducers) + 1 = oProducer.MaxCount
'The RecordNumber from the last Producer needs to be set as start criteria for the next call
oProducer.RecordNumber = oProducers(oProducer.MaxCount - 1).RecordNumber
'Do something before this next call with the previous set of oProducers.
'They are about to be replaced with a new set.
oResult = oConnexion.FindProducersByCriteria(oProducer, oProducers)
Loop
See Also