Skip to Content

Error creating document when it is subject to an approval process sap b1 service layer

Hello,

When i want to create a document using service layer, and i know it will need an approval, draft document is created however api response is this

{ "error": { "code": -2028, "message": { "lang": "en-us", "value": "No matching records found (ODBC -2028)" } } }

i couldn't find what is missing.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 09 at 05:41 PM

    Dear Kivanc Bilen,

    Here is the update on the mentioned issue:

    This is an special case and system behavior. The reason is that you create a Purchase Order/Sales Order but actually it is added as a draft. This does not follow oData specification, therefore, "No matching records found" is returned.

    A workaround for this is to specify a request header as below:

    Prefer: return-no-content

    On success, HTTP code 204 is returned without content, instead of the usual 201 resources created. You will get 204 No Content after the creation of Draft.

    Kind regards,

    ANKIT CHAUHAN

    SAP Business One Support

    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.