Below is the code that is causing this error.
The Standard Text does not exist. Identification fields and values: Code='....'
oNavPurchaseOrder.oNavPurchase_Service ord = new oNavPurchaseOrder.oNavPurchase_Service();
ord.Url = "integrations/.../oNavPurchase";
oNavPurchaseOrder.oNavPurchase or = new oNavPurchaseOrder.oNavPurchase();
ord.UseDefaultCredentials = true;
or.Vendor_Order_No = "100001";
or.Buy_from_Vendor_No = "10000";
or.Document_Date = DateTime.Parse(DateTime.Now.ToShortDateString());// DateTime.Parse(ceI.document_date);
try
{
ord.Create(ref or);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message + ex.Source + ex.StackTrace);
}
int des = 5;
or.PurchLines = new oNavPurchaseOrder.Purchase_Order_Line[des];
for (int idx = 0; idx < des; idx++)
or.PurchLines[idx] = new oNavPurchaseOrder.Purchase_Order_Line();
ord.Update(ref or);
int h = 1;
var hh = or.PurchLines[h];
hh.TypeSpecified = true;
hh.QuantitySpecified = true;
hh.Direct_Unit_CostSpecified = true;
hh.Type = oNavPurchaseOrder.Type.Item;
hh.No = "LS-MAN-10";
hh.Quantity = 2;
hh.Direct_Unit_Cost = 10;
hh.Total_Amount_Excl_VATSpecified = false;
hh.Total_Amount_Incl_VATSpecified = false;
hh.Total_VAT_AmountSpecified = false;
ord.Update(ref or);
*This post is locked for comments