Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

Re: How to get customer code by generate by system?

$
0
0

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


View Pedro Magueija's profile on LinkedIn


Viewing all articles
Browse latest Browse all 8545

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>