OpenSync

Home Forums OpenSync Inserting Invoice error: Object variable or With block variable not set

This topic contains 7 replies, has 2 voices, and was last updated by  Yudel Rosales 1 day, 9 hours ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #62374

    Bob
    Participant

    Hello,
    The 2 rows below get inserted into the database but the operation errors. I’ve also completely rebuilt the databases as well and get the same error. I’m a bit bummed out that basic stuff like this doesn’t work. Please let me know if I did something wrong.
    Thanks
    Bob

    91 invoice:invoicelinedetail validateitemchilddependencies 123456: Object variable or With block variable not set 2017-11-08 13:19:23

    INSERT INTO qb_d2g.invoice
    ( TxnID, CustomerRef_FullName, ARAccountRef_FullName, TemplateRef_FullName, DueDate,
    SalesRepRef_FullName, CustomerSalesTaxCodeRef_FullName, ItemSalesTaxRef_FullName,
    TermsRef_FullName, TxnDate, status)
    SELECT
    ‘123456’ AS TxnID,
    qc.FullName AS CustomerRef_FullName,
    ‘Accounts Receivable’ AS ARAccountRef_FullName,
    ‘___Data2Go Service Invoice’ AS TemplateRef_FullName,
    i.inv_due_date AS DueDate,
    qc.SalesRepRef_FullName AS SalesRepRef_FullName,
    qc.SalesTaxCodeRef_FullName AS CustomerSalesTaxCodeRef_FullName,
    qc.ItemSalesTaxRef_FullName AS ItemSalesTaxRef_FullName,
    qc.TermsRef_FullName AS TermsRef_FullName,
    i.inv_stment_date AS TxnDate,
    ‘ADD’ AS status
    FROM
    carrier_cdr.stream_inv_records i
    LEFT JOIN
    qb_d2g.customer qc ON qc.FullName = i.cust_ref_id_ext
    WHERE
    i.inv_number LIKE ‘20171011%’
    AND i.inv_tot_new_chgs != 0
    ORDER BY
    CompanyName
    LIMIT 1;

    — Invoice Line Detail
    INSERT INTO qb_d2g.invoicelinedetail
    ( IDKEY, Description, Amount, Rate, ItemRef_FullName, ClassRef_FullName, SalesTaxCodeRef_FullName )
    SELECT
    ‘123456’ AS IDKEY,
    i.inv_number AS Description,
    i.inv_tot_new_chgs AS Amount,
    i.inv_tot_new_chgs AS Rate,
    ‘Airtime Services’ AS ItemRef_FullName,
    qc.ClassRef_FullName AS ClassRef_FullName,
    ‘Non’ AS SalesTaxCodeRef_FullName
    FROM
    carrier_cdr.stream_inv_records i
    LEFT JOIN
    qb_d2g.customer qc ON qc.FullName = i.cust_ref_id_ext
    WHERE
    i.inv_number LIKE ‘20171011%’
    AND i.inv_tot_new_chgs != 0
    ORDER BY
    CompanyName
    LIMIT 1;

    #62376

    Which version of OpenSync are you using. Also, if you want to check your sql statements, you will have to purchase premium support.
    Best Regards,

    #62382

    Bob
    Participant

    Hi Yudel,
    We’re using 3.0.16, the latest. I don’t really need help writing SQL but I do need help identifying what this error means. I included the query to provide your team with as much info as possible for diagnosis of the problem. The row of data inserted conforms to what the documentation says to do, so if the docs are inaccurate, I would need to know that too.
    Thanks

    #62384

    Can you send the log files please? On the main windows go to Help-Send Diagnostics.

    #62386

    Bob
    Participant

    OK, I sent them referencing the title of this topic.
    Thanks

    #62469

    Bob
    Participant

    Hello,
    Is there any update on this issue? This feature was main purpose for purchasing the product.
    Thanks

    #62485

    Bob
    Participant

    Interestingly, after updating to 3.0.17 and doing the exact insert above, I was finally able to insert an invoice and invoiceItem.

    #62495

    Glad to hear that Bod. Thanks for the update.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.