Skip to Content
Former Member
Oct 17, 2008 at 02:55 PM

Get next BusinessPartners Code/Key


Hi together,

I am looking for a way to get the next CardCode of a BusinessPartner to add a new one by DIApi.

I tried it by using some Code like this, but it does not work fine:

Dim oSeriesService As SAPbobsCOM.BusinessPartnersService = cmpService.GetBusinessService(SAPbobsCOM.ServiceTypes.BusinessPartnersService)

Dim oSeriesCollection As SAPbobsCOM.BusinessPartners = oSeriesService.GetDataInterface(SAPbobsCOM.BusinessPartnersServiceDataInterfaces.bpsdiBPCodes)

The Bold Text is not very fine, because there is no method like 'GetNextCardCode', otherwise its not tested, so i dont think this would work.

Is there a way like the SeriesService... eg. there are no problems to get the next DocNum of an invoice 😔

Thank you!