Skip to Content
avatar image
Former Member

Error creating delivery notes with batch numbers and bin locations

Hello everyone,

im having the following error when trying to add multiple items from a sales order to a delivery using batch numbers and bin locations.

As long as i am using a single item its fine. using multiple items causes the following error

Payload Role="C" id="atom1" system="0010000119" status="success" b1login="Technical User" method="Synchronous Insert" objectid="15" payload="atom2" keyname="DocEntry" keyvalue="0" DIresult="failure" DImsg="Exception : DI Error: (-5002) Invalid value [DLN1.BaseLine][line: 1]" />

this is the message i prepared and no matter how i assing line number, seriallinenumbers etc. it wont work.

<?xml version='1.0' encoding="UTF-8"?>
<CreateDelivery>
  <Document>
  <CardCode>K100002</CardCode>
  <DocDate>2014-01-08</DocDate>
  <DocDueDate>2014-01-08</DocDueDate>
  <DocNum>200027</DocNum>
  <DocumentLines>
  <row>
  <DocEntry>42</DocEntry>
  <LineNum>0</LineNum>
  <ItemCode>8705</ItemCode>
  <Quantity>10</Quantity>
  <WarehouseCode>SB</WarehouseCode>
  </row>
  <row>
  <DocEntry>42</DocEntry>
  <LineNum>1</LineNum>
  <ItemCode>8705</ItemCode>
  <Quantity>10</Quantity>
  <WarehouseCode>LH</WarehouseCode>
  </row>
  </DocumentLines>
  <BatchNumbers>
  <row>
  <BatchNumber>20150701</BatchNumber>
  <Quantity>10</Quantity>
  <BaseLineNumber>0</BaseLineNumber>
  </row>
  <row>
  <BatchNumber>20141229</BatchNumber>
  <Quantity>10</Quantity>
  <BaseLineNumber>1</BaseLineNumber>
  </row>
  </BatchNumbers>
  <DocumentLinesBinAllocations>
  <row>
  <BinAbsEntry>4</BinAbsEntry>
  <Quantity>5</Quantity>
  <BaseLineNumber>0</BaseLineNumber>
  <SerialAndBatchNumbersBaseLine>0</SerialAndBatchNumbersBaseLine>
  </row>
  <row>
  <BinAbsEntry>5</BinAbsEntry>
  <Quantity>5</Quantity>
  <BaseLineNumber>0</BaseLineNumber>
  <SerialAndBatchNumbersBaseLine>0</SerialAndBatchNumbersBaseLine>
  </row>
  </DocumentLinesBinAllocations>
  </Document>
</CreateDelivery>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 09, 2015 at 04:16 PM

    Hi Simon,

    the problem seems to be structure of your Document.

    Your schema is the following:

    <CreateDelivery>

         <Document>

              <DocumentLines>

                   ...

              </DocumentLines>

                   ...

              </BatchNumbers>

         </Document>

    </CreateDelivery>

    Please run the metadata retrieval (Maintenance -> Cfg Metadata) and check the B1 object help via Help -> B1 Object Help, display the Object List and check the Object Template for DeliveryNotes:

    <Documents>

         <row>

              <!--multiple such elements are allowed-->

              ...

         </row>

    </Documents>
    <Document_Lines>
           <row>

              <!--multiple such elements are allowed-->

              ...

    </row>

    </Document_Lines>

    <BatchNumbers>

    <row>

    <!--multiple such elements are allowed-->

    ...

    </row>

    </BatchNumbers>

    <DocumentLinesBinAllocations>

    <row>

    <!--multiple such elements are allowed-->

    ...

    </row>

    </DocumentLinesBinAllocations>

    Best regards

    Bastian

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Bastian Schaefer

      Hello Bastian,

      this did the trick. Thank you so much for your help and support. You are totally right about the Query Params. I dont need them but they dont seem to bother me right now (i will still remove them)

      Thanks you very much and have a nice day.

      Regards Simon

      BIG EDIT:

      Now that i want to assign the Bin Locations i am getting the following error:

      <Payload Role="C" id="atom1" system="0010000119" status="success" b1login="Technical User" method="Synchronous Insert" objectid="15" payload="atom2" keyname="DocEntry" keyvalue="0" DIresult="failure" DImsg="Exception : DI Error: (-10) 1470000838 - Invalid "SerialAndBatchNumbersBaseLine"; specify a valid "SerialAndBatchNumbersBaseLine"" />

      What would be the value needed in the "SerialAndBatchNumberBaseLine". I thought it would be the same as the BaseLineNumber/BaseLine and i cant find a node in the structure which fits in my opinion or would make sense:

      Thanks for another advice there

      ANOTHER EDIT:

      The SerialAndBatchNumbersBaseLine in the BinAllocations cannot be empty but the node is not needed in the structure itself. Just to let everyone else know that this works now.

      Thank you everyone.