I get an error that says I am unable to upload a SalesOrder because the ShippingCostField is missing. However, I have actually set this field and have verified this when debugging. Is there another set of circumstances that would result in me getting this message? Below is my code sample if you would like to look.
#region Create Test Order
SalesOrder order = new SalesOrder();
order.balance = 0.0;
order.balanceSpecified = true;
order.billAddress = test.addressbookList.addressbook[0].addr1;
order.itemList = new SalesOrderItemList();
order.entity = new RecordRef();
order.entity.internalId = test.internalId;
order.entity.name = test.firstName + test.middleName + test.lastName;
order.discountRate = "0%";
order.discountTotal = 0.0;
order.discountTotalSpecified = true;
order.isTaxable = true;
order.isTaxableSpecified = true;
order.lastModifiedDate = DateTime.Now;
order.lastModifiedDateSpecified = true;
order.subTotal = 0.0;
order.subTotalSpecified = true;
order.shippingCost = 0.0;
order.shippingCostField = 0.0;
order.shippingCostSpecified = true;
order.tax2Total = 0.0;
order.tax2TotalSpecified = true;
order.taxItem = test.taxItem;
order.taxRate = 8.25;
order.taxRateSpecified = true;
order.taxTotal = 0.0;
order.taxTotalSpecified = true;
#endregion
//_client.Login();
WriteResponse response = _client.Upload(order);
_client.Logout();
I am already logged into NetSuite at the time this function is called.
Here is the error I receive:
{System.Web.Services.Protocols.SoapException: com.netledger.common.schemabean.NLSchemaBeanException: shippingCostField not found on {urn:sales_2_6.transactions.webservices.netsuite.com}SalesOrder