cancel
Showing results for 
Search instead for 
Did you mean: 

UDO with different numbering series

Former Member
0 Kudos

Hi, we have a UDO with 2 different numbering series. When adding documents to the default, it is ok and adds the doc to the next avaialble number. The problem is when selecting the second serie, when adding the doc, it gets added to the default serie. A message says: "the actual posted document number is..

Does anyone have an idea why this happens??

THanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Eneveux
Product and Topic Expert
Product and Topic Expert
0 Kudos

Lucas,

I am not sure that I understand the issue, as I am not sure what you mean when you say ... "The problem is when selecting the second series". What second series? When you created the UDO, did you state that you wanted SAP Business One to manage your document numbers? Possibly you did as the "default" document number in Business One is getting updated ... correct?

What you may want to look at is if you want to manage a new document series ( a different one than the default), you may want to look at the SeriesServiceObject and specifically at the GetDocumentSeries method in the SDK Help Center documentation if you have already setup a new document series for this UDO in Business One and want to use it.

HTH,

Eddy

Former Member
0 Kudos

Eddy,

Thanks for your answer. I am using SDK 2007.

When I created de UDO, I set manageseries = yes. I enter the series into sbo form. But when I try to use a serie other diferent than default, when the document is posted, I get the message : "the actual posted docuement is ..." and show me the numbering of default series.

This is way that I am using to set the number to docnum:

oEdit = oForm.Items.Item("SrValue").Specific

oEdit.Value = GetDocNumBySerie(as_series)

Public Function GetDocNumBySerie(ByVal au_serie As Integer) As Integer

Dim oCmpSrv As SAPbobsCOM.CompanyService

Dim oSeriesService As SAPbobsCOM.SeriesService

Dim oSeries As SAPbobsCOM.Series

Dim oSeriesParams As SAPbobsCOM.SeriesParams

'get company service

oCmpSrv = oCompany.GetCompanyService

'get series service

oSeriesService = oCmpSrv.GetBusinessService(SAPbobsCOM.ServiceTypes.SeriesService)

'get series params

oSeriesParams = oSeriesService.GetDataInterface(SAPbobsCOM.SeriesServiceDataInterfaces.ssdiSeriesParams)

'set the number of an existing series

oSeriesParams.Series = au_serie

'get the series

oSeries = oSeriesService.GetSeries(oSeriesParams)

'Return the series num

Return oSeries.NextNumber

end function

Thanks for your help.

Lucas