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

problems for creating a delivery from a order with less items

hye, I have created a delivery from a sales order and all is ok. So, If I put less quantity in severals items, the delivery is generated ok and the sales order is OPEN status.

Now , I want to generate a delivery from sales order, but I don´t want to include in my delivery all sales order's items. For example, if I have in my sales order four items (Itm1,Itm2,Itm3,Itm4) with theirs quantity, by SDK I want to generate the Delivery with Itm2 and Itm3 only. I can't do that. I hate It,jajajajajaja.

With the next FOR, I get do it with all Items but I don´t know to say it that when status = 0 "jump" this item.

delivery.CardCode = Order.CardCode

delivery.DocDueDate = Order.DocDueDate

delivery.DocDate = Order.DocDate

For i = 0 To Order.Lines.Count - 1

delivery.Lines.BaseType = 17

delivery.Lines.BaseEntry = Order.DocEntry

Status = 1

If Status <> 0 Then

delivery.Lines.BaseLine = place

If i <> Order.Lines.Count - 1 Then


place = place + 1

End If

End If


retval = delivery.Add

Thanks and I hope to get a solution.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 28, 2005 at 02:40 PM

    What is "it" that you cannot do (+ hate)???

    What is "status"? LineStatus???

    What is your problem when you try to skip an item?

    PS: You should always use enums instead of hard-coded values e.g.: Use the BoAPARDocumentTypes Enumeration for delivery.Lines.BaseType

    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.