"
Hi!
We are using simple code to add new line item to order and it doesn’t' work:
protected void Button1_Click(object sender, EventArgs e)
{
IiMISUser user = (IiMISUser)CStaffUser.Login(ConfigurationManager.AppSettings["System.WebLogin"], ConfigurationManager.AppSettings["System.Password"]);
CStandardOrder myOrder = new CStandardOrder(user);
CStandardOrderLine myNewItem = myOrder.NewLineItem("EDU_XXXXXX", 1);
}
First 2 line work but
myNewItem is allways NULL.
Please help.
Thank you!
After calling the below
After calling the below line
CStandardOrderLine myNewItem = myOrder.NewLineItem("EDU_XXXXXX", 1);
Please check
if (orderline != null)
{
// make changes to order line
}
otherwise check whether there are any errors added into myOrder object.
something like
if (myOrder.ErrorCount > 0)
{
Console.WriteLine(myOrder.Errors.PrimaryErrorMessage);
}