Skip to Content

Link button to User Defined Object in Grid

Hi,

I'm using SAP B1 8.81 with B1DE.

I have added a grid which is populated from a DataTable to a form.

One of the columns in the grid contains the DocEntry of a User Defined Object.

How can I display a link button on the grid ?

Regards,

Ben

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2011 at 04:01 PM

    Hello Ben,

    You need to set the column object type.

    Dim oGrid As SAPbouiCOM.Grid = oForm.Items.Item("MyGrid").Specific
    oGrid.Columns.Item("DocEntry").Type = BoGridColumnType.gct_EditText
    Dim oEditCol As SAPbouiCOM.EditTextColumn = oGrid.Columns.Item("DocEntry")
    oEditCol.LinkedObjectType = "2" 'The SDK documentation says you should use the value 0, but in previous versions it didn't work, so I recommend you user a value other than -1 or 0
    

    You then need to catch the et_MATRIX_LINK_PRESSED event and other your user form...

    From the SDK Help File regarding the BoLinkedObjectType enum

    lf_None -1 No target object

    lf_UserDefinedObject 0 User-defined object

    lf_GLAccounts 1 G/L account object

    lf_BusinessPartner 2 Business Partner object

    lf_Items 4 Item object

    lf_SalesEmployee 53 Sales employee object

    Regards,

    Vítor Vieira

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2011 at 06:01 AM

    Hi Ben,

    Try This....

    Dim oCol As SAPbouiCOM.EditTextColumn
      oCol = oGrid.Columns.Item("columnuid")
       oCol.LinkedObjectType = "obj_user"
    
    

    Thanks

    Shafi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.