on 05-15-2006 7:59 AM
hi,
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.
regards.
Guru
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.Add
oOrder.Lines.ItemCode = "A1002"
oOrder.Lines.Quantity = 2
oOrder.Lines.Add
oOrder.Lines.ItemCode = "A1003"
oOrder.Lines.Quantity = 3
if oInvoice.Add <> 0 then
MessageBox.Show("Error: " & oCompany.GetLastErrorDescription)
End If
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Regards
Sooriyakala.P
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.