Getting Error "CHECK is not on file"

Hi All,

I am trying to import Salesorder into Sage 100 Using BOI interface, But I am getting an error while import line items  "CHECK is not on file".

I have an issue with the BOI Integration, Can anyone help me or give me a hint to resolve the issue, please?

Thanks,

TJ

  • 0

    It would be good to see your code.  I have not seen this specific message before.

  • 0 in reply to n0tgunshy1

    Hi 

    Here's the part of code that I'm using. Please advice

    using (DispatchObject oARCustomerEntry = new DispatchObject())
    {
    object[] nextSalesOrderNumber = new object[] { "SalesOrderNo$" };

    //Getting next SalesOrder Number
    oARCustomerEntry.InvokeMethodByRef("nGetNextSalesOrderNo", nextSalesOrderNumber);
    objCreateNewSalesOrder.SalesOrderNo = nextSalesOrderNumber[0].ToString();
    object retVal = 0;

    retVal = oARCustomerEntry.InvokeMethodByRef("nSetKeyValue", new object[] { "SalesOrderNo$", objCreateNewSalesOrder.SalesOrderNo });
    retVal = oARCustomerEntry.InvokeMethod("nSetKey");

    retVal = oARCustomerEntry.InvokeMethodByRef("nSetValue", new object[] { "CustomerNo$", CustomerPONumber });
    retVal = oARCustomerEntry.InvokeMethodByRef("nSetValue", new object[] { "ARDivisionNo$", ARDivisionNo });
    // other fields

    string PRODUCT_CODE__C = "10035";
    string QUANTITY = "1";
    string UNITPRICE = "15";

    DispatchObject sales_order_line = new DispatchObject(oARCustomerEntry.GetProperty("oLines"));

    string line = "000001";

    object EditKey = sales_order_line.InvokeMethod("sGetEditKey", line);
    retVal = sales_order_line.InvokeMethod("nEditLine", EditKey);

    sales_order_line.InvokeMethod("nSetValue", "ItemCode$", PRODUCT_CODE__C);
    sales_order_line.InvokeMethod("nSetValue", "UnitPrice", Convert.ToDecimal(UNITPRICE)); //NO $ sign
    int qty = Convert.ToInt32(Convert.ToDecimal(QUANTITY));
    sales_order_line.InvokeMethod("nSetValue", "QuantityOrdered", qty); //No $ sign

    sales_order_line.InvokeMethod("nWrite");

    retVal = oARCustomerEntry.InvokeMethod("nWrite");

    if (retVal.ToString() == "0")
    {
    object errorMsg = oARCustomerEntry.GetProperty("sLastErrorMsg");
    Console.WriteLine("Error Message: " + errorMsg.ToString());
    }
    else
    {
    Console.WriteLine("Success");
    }
    }

  • 0 in reply to TJ Commercient

    You said you are importing new orders, right?  If so, you don't want to use the EditLine method, you use the AddLine method and you don't have to assign a key.  I have no idea if this is causing that error because I've never seen it before, but it's definitely wrong for new orders.  Also, I would advise you to always set the line Quantity before the Unit Price, because setting the Quantity triggers a price calculation.