cancel
Showing results for 
Search instead for 
Did you mean: 

Link link existing user field matrix

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

pedro_magueija
Active Contributor
0 Kudos

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


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

The error occurs when informing the type of link object