on 06-24-2015 8:50 PM
Hi guys,
I have a problem with sdk, I'm a beginner... During fill data into matrix SAP give me thi error:
Internal error (4011) [131-183]
This is the code that I use to populate my matrix:
' Procedo con il caricamento delle scadenze trovate in archivio
Dim oRecINV6 As SAPbobsCOM.Recordset
oRecINV6 = m_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oRecINV6.DoQuery("SELECT DueDate, PaidToDate FROM INV6 WHERE DocEntry = " & EditText8.Value)
' Accedo ai dati
Matrix0.Clear()
For iRec As Integer = 1 To oRecINV6.RecordCount
Dim Scadenza As String = oRecINV6.Fields.Item("DueDate").Value
Dim DaPagare As String = oRecINV6.Fields.Item("PaidToDate").Value
'Matrix0.AddRow(iRec + 1, iRec)
Matrix0.AddRow()
Matrix0.Columns.Item("dtScadenza").Cells.Item(iRec).Specific.Value = Scadenza
Matrix0.Columns.Item("PaidToDate").Cells.Item(iRec).Specific.Value = DaPagare
Matrix0.SetLineData(iRec)
oRecINV6.MoveNext()
Next
I use SAP Business One Studio for Microsoft Visual Studio to create my Add On.
Thank's a lot for all!!!
SOLVED!!!
I solved by adding a datasource to the matrix, binding with the table in datasource e put the value from my recordset!!!
thank's a lot for your indication, It was turned on a small light when you spoke of datasource!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrea Pallotta ,
1.If number of iterations are fixed then go to "For loop",if number of iterations are not fixed go to "While Loop"
2.Check whether u given date filed or not for your feilds(dtScadenza,PaidToDate).
Dim Scadenza as Date=oRecINV6.Fields.Item("DueDate").Value
Dim DaPagare as Date=oRecINV6.Fields.Item("PaidToDate").Value
Matrix0.Columns.Item("dtScadenza").Cells.Item(iRec).Specific.Value = Scadenza
Matrix0.Columns.Item("PaidToDate").Cells.Item(iRec).Specific.Value = DaPagare
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrea,
Can you try this
Dim dtScadenza as DateTime = oRecINV6.Fields.Item("DueDate").Value
Dim dtDaPagare as DateTime = oRecINV6.Fields.Item("PaidToDate").Value
Dim Scadenza As String = dtScadenza.ToString("yyyyMMdd")
Dim DaPagare As String = dtDaPagare.ToString("yyyyMMdd")
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
14 | |
10 | |
5 | |
4 | |
3 | |
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.