Now I have an issue in my DI App to update a invoice document status to Printed when the BP is inactive. When I try to update the document then I get an error from DI, the error code is -10 and the error message is "10001071 - Customer XXX is inactive". The interesting thing is I can print the document in SAP client and the document status can be changed to Printed even the BP is inactive. So I am wondering if there is something not right in my DI App when trying to updating the document status? See below my code in C#.
SAPbobsCOM.Documents doc = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
doc.Printed = SAPbobsCOM.PrintStatusEnum.psYes;
int ret_val = doc.Update();
if (ret_val != 0)
int err_code = 0;
string err_msg = string.Empty;
oCompany.GetLastError(out err_code, out err_msg);