Skip to Content
0
Former Member
Sep 24, 2014 at 11:50 AM

DocNum Link Column in Grid

259 Views

Hi Team,

How can i link the DocNum in Grid column as DocEntry?

Matrix is working, but occur error on below line

<B1Listener(BoEventTypes.et_MATRIX_LINK_PRESSED, True)> _

Public Overridable Function OnBeforeMATRIXLinkPressed(ByVal pVal As ItemEvent) As Boolean

Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)

Dim item As Item = form.Items.Item("grdInvoice")

Dim grid As Grid = CType(item.Specific, Grid)

'ADD YOUR ACTION CODE HERE ...

Dim oDocEntryColumn As EditTextColumn

Try

Select Case pVal.ColUID

Case "DocNum"

oDocEntryColumn = grid.Columns.Item("DocEntry")

oDocEntryColumn.LinkedObjectType = BoLinkedObject.lf_Invoice

End Select

Catch ex As Exception

Throw ex

End Try

Return True

End Function

'<B1Listener(BoEventTypes.et_MATRIX_LINK_PRESSED, False)> _

'Public Overridable Sub OnAfterMATRIXLinkPressed(ByVal pVal As ItemEvent)

' Dim ActionSuccess As Boolean = pVal.ActionSuccess

' Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)

' Dim item As Item = form.Items.Item("grdInvoice")

' Dim grid As Grid = CType(item.Specific, Grid)

' 'ADD YOUR ACTION CODE HERE ...

' Select Case pVal.ColUID

' Case "DocNum"

' grid.Columns.Item("DocEntry").Click(pVal.Row, False, 0)

' End Select