Skip to Content
avatar image
Former Member

new to business one


my requirment is to create SalesOrder in BusinessOne using java.

i have DI API.

can u guid me for which objects i have to use to create Sales Order in Business one.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 15, 2006 at 09:42 AM

    Hi Guruvulu,

    I do not know Java, but herewith code how you will do it using Visual Basic. I hope that this puts you on the right track.

    Dim oOrder As SAPbobsCOM.Documents
    oOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
    oOrder.DocDate = Date.Now
    oOrder.DocDueDate = Date.Now
    oOrder.CardCode = "C1000"
    oOrder.Lines.ItemCode = "A1001"
    oOrder.Lines.Quantity = 1
    oOrder.Lines.ItemCode = "A1002"
    oOrder.Lines.Quantity = 2
    oOrder.Lines.ItemCode = "A1003"
    oOrder.Lines.Quantity = 3
    if oInvoice.Add <> 0 then
      MessageBox.Show("Error: " & oCompany.GetLastErrorDescription)
    End If 

    Hope it helps,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Guruvulu,

      U can get SalesOrder Number using Business Object of type "OOrders".

      Documents Sales=(Documents)comp.GetBusinessObject(BoObjectTypes.oOrders);

      Sales.GetByKey(1);-->where 1 is the DocEntry number

      <b>int docNum = Sales.DocNum</b>;-->By this way u can get aSales Order Number.