on 09-26-2005 12:21 PM
Hi,
I want to add an order via diapi, and the problem is when introducing the docduedate. The date format of my SBO is DD/MM/YYYY, so I've tried entering 30/09/2005 and it doesn't work.
Does anyone know which format do I have to use?
Thanks in advance,
vane
Hi Vanesa,
1. You can try to add "DateTimePicker" into your window form. And use the value for the DocDueDate.
2. Or you can do query to get the date value and add it to the DocDueDate.
Hope this helps,
Bruce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vanessa,
You should use code like below.
doc.docduedate = new date(year, month,day)
Good luck
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ad,
I've tried what you have told me but it continues giving me error. Perhaps is not the date what is wrong. My code is this:
Dim Pedido As SAPbobsCOM.Documents
Dim LineasPedido As SAPbobsCOM.Document_Lines
Pedido = Compañia.GetBusinessObject (SAPbobsCOM.BoObjectTypes.oOrders)
LineasPedido = Pedido.Lines
With Pedido
.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
.CardCode = 'a'
.DocDueDate = New Date(FechaEntrega.Year, FechaEntrega.Month, FechaEntrega.Day)
.DiscountPercent = 5
End With
With LineasPedido
.ItemCode = 'A001'
.Quantity = 20
.Price = 75
.Add()
End With
Dim n As Integer
n = Pedido.Add()
If n <> 0 Then
log.WriteLine("N: " + n.ToString)
log.Flush()
End If
FechaEntrega is a date (30/09/2005)
Thanks,
vane
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.