📚 SAP Business One SDK Help

GetSeries Method
See Also  Example
pSeriesParams

The SeriesParams identification key of the Series you want to get.

Description

Returns a Series object identified by its SeriesParams.

Syntax

Visual Basic
Public Function GetSeries( _
   ByVal pSeriesParams As SeriesParams _
) As Series

Parameters

pSeriesParams

The SeriesParams identification key of the Series you want to get.

Example

The following is a VB.NET sample that retrieves the series by its parameters.
GetSeries (Visual Basic)Copy Code
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oSeriesService As SAPbobsCOM.SeriesService
Dim oSeries As Series
Dim oSeriesParams As SeriesParams

'get company service
oCmpSrv = oCompany.GetCompanyService

'get series service
oSeriesService = oCmpSrv.GetBusinessService(ServiceTypes.SeriesService)

'get series params
oSeriesParams = oSeriesService.GetDataInterface(SeriesServiceDataInterfaces.ssdiSeriesParams)

'set the number of an existing series
oSeriesParams.Series = 84

'get the series
oSeries = oSeriesService.GetSeries(oSeriesParams)

'print the series name
Debug.WriteLine(oSeries.Name)

See Also