on 06-16-2016 8:30 PM
experts,
Must link a link to an already existing column in an array.
It presented a reference error to object not definidad to instantiate object
oMatrix = oMktForm.Items.Item ("38"). Specific
oColumns = oMatrix.Columns
oColumn = oColumns.Item ("U_US_Contrato")
oLink = oColumn.ExtendedObject
oLink.LinkedObject = 1250000025
I conducted several research and found a way to change the type and already existing field in an array.
I used the function below to work around the problem.
The yellow arrow appears not however have the same effect.
Clicking on the field the form is opened
oMatrixGlobal = oMktForm.Items.Item("38").Specific
For i As Integer = 1 To oMatrixGlobal.RowCount
oEditTextGlobal = oMatrixGlobal.Columns.Item("U_US_Contrato").Cells.Item(i).Specific
Dim menuId As String = "39722"
Dim oMktFormLocal As Form
Dim oEdittextLocal As EditText
If oEditTextGlobal.Value <> "" Then
SBO_Application.ActivateMenuItem(menuId)
oMktFormLocal = SBO_Application.Forms.ActiveForm
oMktFormLocal.Mode = BoFormMode.fm_FIND_MODE
oEdittextLocal = oMktFormLocal.Items.Item("1250000004").Specific
oEdittextLocal.Value = oEditTextGlobal.Value
oMktFormLocal.PaneLevel = 1
oMktFormLocal.Items.Item("1250000001").Click()
End If
i += oMatrixGlobal.RowCount
Next
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ted,
"Object not reference to an instance of an object" indicates that one of the object trying to be used is null. An example would be if your oMatrix == null, then the oMatrix.Columns would fail with that message.
You can debug the code to check which of the object in that code is null, then make the necessary adjustments to make it a valid instance of an object.
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.