Hi Tony,
You can also get it from the Series object.
CompanyService srv = b1.Company.GetCompanyService(); SeriesService seriesService = srv.GetBusinessService(ServiceTypes.SeriesService) as SeriesService; SeriesParams seriesParams = seriesService.GetDataInterface(SeriesServiceDataInterfaces.ssdiSeriesParams) as SeriesParams; seriesParams.Series = 60; // the auto series code (will be different in your system) Series bpAutoSeries = seriesService.GetSeries(seriesParams);
Note that with that object you can build the series code (even if it has prefix and suffix).
Warning: note that if you place that code in your form and use it, another user (in another machine) might create a business partner with that code. Make sure the code is there only as an information. You should only get the code when you're just about to use it (e.g.: the before form_data_add event).
Best regards,
Pedro Magueija