Hi All,
We are getting very strange error while doing receipt confirmation.Actually when we were using the WSDL 2.6 version, we have written the following code in MS.NET 2005 and which was working fine.
ItemReceipt ItmRcpt = new ItemReceipt();
if (ItmRcpt.landedCostMethod.ToString() != null)
{ ItmRcpt.landedCostMethod = LandedCostMethod._weight;
ItmRcpt.landedCostMethodSpecified =true;
}
else
{
ItmRcpt.landedCostMethodSpecified = false;
}
Recently we upgraded our application to WS 2008.1 version and the same code is behaving differently and it is throwing the below compilation error.
Compiler Error Message: CS0266: Cannot implicitly convert type
'com.netsuite.webservices.LandedCostMethod1' to 'com.netsuite.webservices.LandedCostMethod'. An explicit
conversion exists (are you missing a cast?) .
Based on the error message we tried to resolve this by using three cases of code
Case1)
ItmRcpt.landedCostMethod = LandedCostMethod._weight;
ItmRcpt.landedCostMethodSpecified =true;
CaseII)
ItmRcpt.landedCostMethod = LandedCostMethod1._weight;
ItmRcpt.landedCostMethodSpecified =true;
CaseIII)
ItmRcpt.landedCostMethod = (LandedCostMethod1)LandedCostMethod._weight;
ItmRcpt.landedCostMethodSpecified =true;
But for these three cases also we are getting the same error message and strangely some times if we use one of the code(in the above three cases) the application is running perfectly and receipt confirmation also working but after some time the same code is throwing to the above shown compilation error.
Can you please let me know how to proceed on this and please suggest us if there is any explicit conversion for this.It would be helpful if you provide any code sample for this conversion.
Thanks in advance,
7HUser