Segment3_Retrieve
  • 1 Minute to read
  • Dark
    Light
  • PDF

Segment3_Retrieve

  • Dark
    Light
  • PDF

Article summary

Retrieves the collection of Segment3 objects that meet the filter criteria supplied. Each segment3 object returned from this method corresponds to a data row of segment3 in database.

Syntax

Segment3 = api.Segment3_Retrieve (SegmentFilter FilterCriteria)

Usage

Use the Segment3_Retrieve call to retrieve Segment3 data. When a Client application invokes the Segment3_Retrieve call, it passes in the segment3 filter criteria in collection of SegmentFilter objects to filter the data rows.

Upon invocation, the Web Service queries the database for segment3 data rows with the specified filter criteria and returns the collection of segment3 objects. Each segment3 object corresponds to a data row in the database. The Client application can then use methods on the collection of segment3 objects to iterate through the collection and retrieve information. The Client application must be logged in with sufficient access rights to query segment3 objects.

Arguments List

The following table provides a list of arguments that are required for the Segment3_Retrieve method call:

NameTypeDescription

SegmentFilter

SegmentFilter()

Collection of segment3 filter objects to filter the segment3 data rows during retrieval.

Response

The Segment3_Retrieve method call returns collection of Segment3 objects, which contain the data values of segment3 data rows in the database. In recent updates, the retrieved data will also have the IDs of all the Leaf, Roll-Up, and Parent Members.

Sample Code

Private Sub RetrieveSegment3()
  Dim api As New HostAPI()
  'This method retrieves all segment3 objects that start with the code specified.
  Dim objSegment3() As Segment3, objSegment3Filter As Segment3Filter
  Dim objSegment3FilterCollection() As Segment3Filters, strValue() As String
  Try
  	'Create a new segment3 filter to add the filter criteria during retrieval
  	objSegment3Filter = New Segment3Filter
  	objSegment3Filter.Field = Segment3Field.Code
  	objSegment3Filter.FieldOperator = FieldOperator.StartsWith 
  	ReDim strValue(0)
  	strValue(0) = "10"
  	objSegment3Filter.Value = strValue
  	'Add the filter objects built to the filter collection to pass to the web method
  	ReDim objSegment3FilterCollection(0)
  	objSegment3FilterCollection(0) = New Segment3Filter
  	objSegment3FilterCollection(0) = objSegment3Filter
  	'Call the web method to retrieve the segment3 collection
  	objSegment3 = api.Segment3_Retrieve (objSegment3FilterCollection)
  	'Loop through the segment3 collection to display the segment3 objects retrieved
  	If Not objSegment3 is Nothing Then
  		Console.WriteLine ("Code" & vbTab & "|" &_Obj.Name & vbTab &
  		"|AccountGroup" & vbTab & "|AccountyType")
  		For Each _Obj As Segment3 In objSegment3
  			Console.WriteLine (_Obj.Code & vbTab & "|" _Obj.Name & vbTab &
  			"|" & _Obj.AccountGroup.ToString() & vbTab & "|" &
  			_Obj.AccountType.ToString())
  		Next
  	End If
  	Console.ReadLine()
  Catch ex As Exception
  End Try
End Sub

Was this article helpful?