Skip to Content
0
Former Member
Dec 20, 2007 at 11:36 AM

Error -2028 adding a new service contract

29 Views

Hi,

I'm using SDK to add a new contract

...

objServiceContract.Description = "CONTRATTO"

objServiceContract.CustomerCode = adoRsTemp.Fields("NoCliente").Value

objServiceContract.CustomerName = adoRsTemp.Fields("NomeCliente").Value

objServiceContract.StartDate = adoRsTemp.Fields("InizioGaranzia").Value

objServiceContract.EndDate = adoRsTemp.Fields("FineGaranzia").Value

objServiceContract.ResolutionTime = 8

objServiceContract.ResolutionUnit = rsu_Hours

objServiceContract.ContractType = ct_SerialNumber

objServiceContract.Lines.Add

objServiceContract.Lines.ItemCode = adoRsTemp.Fields("NumeroArticolo").Value

objServiceContract.Lines.ManufacturerSerialNum = adoRsTemp.Fields("NumeroSerie").Value

objServiceContract.Lines.StartDate = adoRsTemp.Fields("InizioGaranzia").Value

objServiceContract.Lines.EndDate = adoRsTemp.Fields("FineGaranzia").Value

....

...

but when I execute the command:

objServiceContract.Add()

I have the error:

-2028 Invalid Code [CTR1.ItemCode][line: 2]

Can someone help me, please?

Regards

Emanuele