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

DI Server Add New Invoice Question

Hi,

Any one knows the answer for the following question.

I insert a new invoice successfully by using the sample code. The invoice created has DocStatus C. It means Close.

<?xml version="1.0" encoding="UTF-16"?>

http://schemas.xmlsoap.org/soap/envelope/">

<env:Header>

<SessionID>F46EDCE6-3F79-1F9F-1D1E-DC6226D04FA7</SessionID>

</env:Header>

<env:Body>

http://www.sap.com/SBO/DIS" CommandID="Add invoice">

<BOM>

<BO>

<AdmInfo>

<Object>oInvoices</Object>

</AdmInfo>

<Documents>

<row>

<DocDate>20040707</DocDate>

<DocDueDate>20040707</DocDueDate>

<CardCode>BP</CardCode>

</row>

</Documents>

<Document_Lines>

<row>

<ItemCode>Item1</ItemCode>

<Quantity>3</Quantity>

<TaxCode>My Tax</TaxCode>

</row>

<row>

<ItemCode>Item2</ItemCode>

<Quantity>2</Quantity>

<TaxCode>My Tax</TaxCode>

</row>

</Document_Lines>

</BO>

</BOM>

</dis:AddObject>

</env:Body>

</env:Envelope>

However, I try to put extra field DocStatus for oInvoice(OINV) by adding new line

<DocStatus>O<DocStatus> in between <CardCode>BP</CardCode> and </row>, the Soap response with

Faulty reason "Property 'DocStatus' of 'Document' is invalid".

I know I can run another request to update the DocStatus but this seems not a good solution.

Is there other way to do it?

Please help

Thanks advance

Glenn

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 25, 2008 at 08:11 AM

    Glenn (or Olga) - make your life easier. Use B1WS. This is a WSDL wrapper around DI Server that you can download from SDN. Go to the home page of B1 or under the section "Business One SDK Tools".

    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.