BOI - Deleting AR invoice record.

SOLVED

HI,

I am trying to programmaticlly delete an AR invoice record in Sage 100 2015 using BOI and VB.net.  We are using the Providex.PvxDispatch, AR_Invoice_bus object (gpARInvoice) with the nDelete method passing the invoice number with 'IN' appended to the end of that number (0012219IN).  The response I am getting from sLastErrorMsg is 'Missing or invalid header'.  Can someone shed some light on why this would not work?


status = gpARInvoice.nDelete("0012219IN")
lsError = gpARInvoice.sLastErrorMsg

Thanks