on 08-24-2017 9:15 AM - last edited on 02-04-2024 1:26 AM by postmig_api_4
Hi,
I use SAP Business One 9.0 and SAP UI API 9.0 with a VB.NET addon.
I want to add a row in a matrix of the sales orders form before the event data update and cancel the update if some product are present in the orders.
I try to do it with the event data load after the action and it's worked.
When I do it with the event data update before the action the text appear in the cell but with an error and the row is not filled with the item information.
Public Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
Dim action As String = BusinessObjectInfo.ActionSuccess.ToString()
Dim evt AS String = BusinessObjectInfo.EventType.ToString()
Dim form As SAPbouiCOM.Form = SBO_Application.Forms.ActiveForm
If evt = "et_FORM_DATA_UPDATE" And action = "False" Then
Dim matrix as SAPbouiCOM.Matrix = form.Items.Item("38").Specific
Dim row = matrix.Columns.Item("1").Cells.Count
Dim editText as SAPbouiCOM.EditText = matrix.Columns.Item("1").Cells.Item(row).Specific
editText.Value = "55549"
BubbleEvent = False
End If
End Sub
Error in SAP B1 UI:
Error in VB.NET:
Anybody can help me, please?
Thanks and regards.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.