Epicor Version: 10.2.300.0
Issue: We have Serial Numbers with leading zeros. The SQL field type for SerialNo.SerialNumber is nvarchar(40). When I make a call to the SerialNo BO, it strips the leading zero(s). I have found several ways to keep the leading zeros, but only with standard SQL queries that I control, not using a call to an Epicor BO that loads a dataset. The number of leading zeros and serial number length may vary, so I don’t believe that padding is an option.
Excerpted code:
using (session = new Ice.Core.Session(epicorLoginUsername, epicorLoginPassword, currentAppServerURL, userLicenseType, clientConfigFile))
{
oTrans = new Ice.Lib.Framework.ILauncher(session);
int absolutePage = 0;
int pageSize = 0;
string whereClause = string.Empty;
var serialNoBO = Ice.Lib.Framework.WCFServiceSupport.CreateImpl<Erp.Proxy.BO.SerialNoImpl>(session, Erp.Proxy.BO.SerialNoImpl.UriPath);
whereClause = string.Format("Company = '{0}' AND SNStatus <> 'FORMAT' AND PartNum = '{1}' AND JobNum = '{2}' BY SerialNumber", companyID, assemblyNumber, epicorJobNumber);
pageSize = 100;
var serialNoDS = serialNoBO.GetList(whereClause, pageSize, absolutePage, out bool morePages);
By the time I retrieved serialNoDS, the first SerialNo.SerialNumber went from ‘0418340427’ to ‘418340427’. Anyone have any tricks up their sleeve?
Thanks in advance.