Hi Alejandro,
On a standard Business One client, they are no small icon to generate the CardCode.
On a standard company, with no add-on the only thing you can do is to specify series (and set one as a default) for Customers and Vendors, in which case it can be used by the DI-API.
Code is something like this:
var businessPartners = (SAPbobsCOM.BusinessPartners)_company.GetBusinessObject(BoObjectTypes.oBusinessPartners);
businessPartners.Series = 58; // Change the number by querying the ONNM table
...
businessPartners.Add();
var newCardCode = _company.GetNewObjectKey();
Regards,
Eric