Skip to Content
author's profile photo Former Member
Former Member

How To Cancel Ap Invoice Through SDK Code ?

Hi Experts,

I would like to cancel AP Invoice of non perpetual inventory through SDK Code.

I have Written the Code

SAPbobsCOM.Documents oInvoice;

oInvoice = clsAddOn.LDNA_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices);

oInvoice.GetByKey(Incoice_DocEntry);

oInvoice.Cancel() ;

but it give Error

The requested action is not supported for this object.


how can i cancel the AP invoice.

- Regards

Vikas


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2016 at 03:40 PM

    Accounting Documents cannot be legally deleted, because they are important business documents. You have to create an A/P Credit Memo as a "reverse document" to reverse this.

    A/P Credit Memo - SAP Business One 8.82 - SAP Library

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.