Description
Syntax
Parameters
Example
The following is a VB.NET sample related to the the Belgium localization, which is different than other localizations. It shows how to add a series, attach it to a document and set it as the default series.
| AddSeries (Belgium localization) (Visual Basic) | Copy Code |
|---|
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oSeriesService As SAPbobsCOM.SeriesService
Dim oSeries As Series
Dim oSeriesParams As SeriesParams
Dim oDocSeriesParam As DocumentSeriesParams
oCmpSrv = oCompany.GetCompanyService
oSeriesService = oCmpSrv.GetBusinessService(ServiceTypes.SeriesService)
oSeries = oSeriesService.GetDataInterface(SeriesServiceDataInterfaces.ssdiSeries)
oSeries.Name = "Series1"
oSeries.PeriodIndicator = "Default"
oSeries.GroupCode = 1
oSeries.InitialNumber = 300
oSeries.LastNumber = 350
oSeriesParams = oSeriesService.AddSeries(oSeries)
oDocSeriesParam = oSeriesService.GetDataInterface(SeriesServiceDataInterfaces.ssdiDocumentSeriesParams)
oDocSeriesParam.Document = "15"
oDocSeriesParam.Series = oSeriesParams.Series
Call oSeriesService.AttachSeriesToDocument(oDocSeriesParam)
Call oSeriesService.SetDefaultSeriesForCurrentUser(oDocSeriesParam)
|
|
See Also