📚 SAP Business One SDK Help

UpdateSeries Method
See Also  Example
pISeries

Specifies the Series that will replace the current series.

Description

Replace a Series by another Series.

Syntax

Visual Basic
Public Sub UpdateSeries( _
   ByVal pISeries As Series _
) 

Parameters

pISeries

Specifies the Series that will replace the current series.

Example

Description: shows how to update a Series.
UpdateSeries (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 = 28

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

'set the series name
oSeries.Name = "MySeries"

'update series
oSeriesService.UpdateSeries(oSeries)

See Also