Link button in matrix

Hi all,
I am using link button in matrix. I bound link button with existring SAP transcation like employees and UDO too. but link is not working in both cases.
can anybody help me out....
Manish

Hi Manish,
Please refer the following sample code:
Dim oMatrix As SAPbouiCOM.Matrix = oItem.Specific
        Dim oColumns As SAPbouiCOM.Columns = oMatrix.Columns
        Dim oColumn As SAPbouiCOM.Column = oColumns.Add("DBS_Col1", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
        oColumn.TitleObject.Caption = "EmpId"
        Dim oLink As SAPbouiCOM.LinkedButton = oColumn.ExtendedObject
        oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_lf_Employee
By the way, SDK Online Help is a good knowledge base, either searching in the forum help.
Kind Regards, Yatsea

Similar Messages

  • Link Buttons In Matrix

    Hi,
    I'm having trouble trying to link an Employee name in a column within a matrix to the Employee form. I can make it happen with the Employee Id, but can't understand how to make that link but display the Employee name,
    any ideas ??
    cheers,
    Mark

    hello
    please i need help on this issue, i'm working on VB60, i`m having trouble when i add a new it_LINKED_BUTTON column to an existing form i don't know if i can write the code in the VB6.0 just like in VB.NET my code looks like
    Set oItem = oTmpForm.Items.Item("54")
    Set oMatCostes = oItem.Specific
        oMatCostes.Clear
    Set oColsCostes = oMatCostes.Columns
    Set oColCostes = oColsCostes.Add("Factura", sapbouicom.BoFormItemTypes.it_LINKED_BUTTON)
    oColCostes.TitleObject.Caption = "Factura de Acreedores"
        oColCostes.Editable = True
        oColCostes.Width = 15
    Set olink = New sapbouicom.LinkedButton
    Set olink = oColCostes.ExtendedObject
    olink.LinkedObject = lf_PurchaseInvoice
    oColCostes = oColsCostes.Item("Factura")
    i have no errors but mi linked buttons can`t link to the PurchaseInvoices the way i want.
    i hope you'll be able to help me
    Gabriela

  • Link button not working in matrix

    Hai To All,
              I created one form with only one matrix. On that i have 5 columns. In first column i have linkbutton link to user defined screen. What its not working.
    My code is here
    If pVal.ItemUID = "matrix" And pVal.ColUID = "Docno" Then
                            Dim oMatrix As SAPbouiCOM.Matrix
                            Dim doc As String
                            oMatrix = Frm.Items.Item(pVal.ItemUID).Specific
                            doc = Trim(oMatrix.Columns.Item("Docno").Cells.Item(pVal.Row).Specific.Value)
                            Dim oForm As SAPbouiCOM.Form
                            Dim blnBool As Boolean = False
                            For frm As Integer = 0 To app.Forms.Count - 1
                                Try
                                    If app.Forms.Item(frm).UniqueID = "PI" Then
                                        oForm = app.Forms.Item("PI")
                                        oForm.Close()
                                        Exit For
                                    End If
                                Catch ex As Exception
                                    app.StatusBar.SetText(ex.Message)
                                End Try
                            Next
                            If blnBool = False Then
                                app.ActivateMenuItem("PI")
                                oForm = app.Forms.Item("PI")
                                oForm.Select()
                                oForm.Freeze(True)
                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                oForm.Items.Item("txt_ino").Specific.Value = Trim(doc)
                                oForm.Items.Item("1").Click()
                                oForm.Freeze(False)
                            End If
                        End If
    Regards,
    Anitha

    Petr,
         Actually this form is same as we discuss sterday that is the form should open automatically without any click. Now my problem is while form opening iam loading some data using query this also working fine. Here iam using linkbutton in matrix. If i click link button i want to open other form which is also created by me. My code is rite but y i dont knw the link button is not working.
    here is the code written in itemevent
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED And pVal.BeforeAction = False
                        If pVal.ItemUID = "matrix" And pVal.ColUID = "Docno" Then
                            Dim oMatrix As SAPbouiCOM.Matrix
                            Dim doc As String
                            oMatrix = Frm.Items.Item(pVal.ItemUID).Specific
                            doc = Trim(oMatrix.Columns.Item("Docno").Cells.Item(pVal.Row).Specific.Value)
                            Dim oForm As SAPbouiCOM.Form
                            Dim blnBool As Boolean = False
                            For frm As Integer = 0 To app.Forms.Count - 1
                                Try
                                    If app.Forms.Item(frm).UniqueID = "PI" Then
                                        oForm = app.Forms.Item("PI")
                                        oForm.Close()
                                        Exit For
                                    End If
                                Catch ex As Exception
                                    app.StatusBar.SetText(ex.Message)
                                End Try
                            Next
                            If blnBool = False Then
                                app.ActivateMenuItem("PI")
                                oForm = app.Forms.Item("PI")
                                oForm.Select()
                                oForm.Freeze(True)
                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                oForm.Items.Item("txt_ino").Specific.Value = Trim(doc)
                                oForm.Items.Item("1").Click()
                                oForm.Freeze(False)
                            End If
                        End If
    Regards,
    Anitha

  • How to use a link button in a matrix

    Hi, I'm trying to create a matrix with a column that uses a link button to call a Sales order.. how can i do it? i'm new in SBO!

    Hi,
    You can do it in 2 differents ways:
    1. With the ScreenPainter. Set the column property "Type" with the value "et_LINK_BUTTON" and the property "LinkObjectType" with the value of the Business Object (for Sales Orders, the value is "17").
    2. Directly on the XML file. You can see and example below.
    <column uid="col" type="116" title="Parte" description="" visible="1" AffectsFormMode="0" width="55" disp_desc="0" editable="1" right_just="0" val_on="" val_off="" backcolor="-1" forecolor="-1" text_style="0" font_size="-1">
          <databind databound="1" table="" alias="col"/>
    <ExtendedObject linkedObject="17" LinkedObjectType="17"/>*
    </column>
    The most important things are the properties "type" (116 for linked button) and "linkedObject" and "LinkedObjectType" (17 for Sales Orders).
    I hope this can help you.
    Regards,
    Cristian Rivero

  • Link Button In Grid or Matrix ?

    Hello,
    I'm trying to populate a grid with data from a SQL query, using a datatable datasource, but I don't know how to specify which fields are to have drill-down(link buttons). After looking at this thread :
    Linked button in a Grid (SBO 2005)
    I'm left wondering how the Business One Report Generator can generate a grid with link buttons attached to the appropriate fields, when it is only given a SQL query.
    I'm thinking I might have to use a matrix, but how can i populate the matrix when if i don't know what the SQL query will be in advance?, also can I achieve the grouping using a matrix that the grid automatically does ?

    Hello Welch,
    Both Matrix and Grid can work with LinkButton. And regarding Grid, first of all, you need to define the gridcolumn type as gct_EditText, then in EditTextColumn Object, there is a property named LinkedObjectType, please set the property as in Matrix column.
    ' First define the column as EditText type
    oCol = oGrid.Columns.Item("Col1")
    oCol.LinkedObjectType = 4
    Hope this helps,
    Nick

  • Link button in BOM matrix

    Hi,
    This link button is able to discriminate between BOMs and nonBOMs.  We would like to open a third form - ours - when the BOM line item has a certain characteristic.  Is there a way to intercept the click on the link button before it works?
    Thanks,
    Mike

    Hi Mike,
    You can intercept the click on the linked button before it is opened. It is an Item_Pressed event.
    There is a tool called EventLogger that can help you in cases like this one. You can download it from main SDN B1 page -> SDK Tools menu in the right side of the page. With this tool you can see the events that are fired by B1 when you do a specific action in B1 app.
    Hope it helps
    Trinidad.

  • Add linked button to a editText field

    Hello everybody,
    i'm trying to add a linked button to a text field in the header of a JournalEntry. So far i've been able to add it on one of the columns of a document matrix.
    Can anybody help me, please?
    Ciao
    Marco

    You need to create a new link button object, set the "linkto" property to point to the UID of the edittext containing the data, and set linkedobject to point to the target object (eg. business partners, items ...)
    Set sboItem = sboItems.Add("LINK", it_LINKED_BUTTON)
    sboItem.LinkTo = "10"  'UID of separate edittext containing the data.
    Set sboLink = sboItem.Specific
    sboLink.LinkedObject = lf_BusinessPartner
    John.

  • Link button does not link to the right record.

    Hi,
    I have created a matrix, and I have made one of the column type as link button. The matrix is loaded with Sales Quotation record, and the DocNo column is a link button. For example, when i pressed the link button of record with DocNo = 10, but the Sales Quotation form pop out is record with DocNo = 8, anyone encountered this problem??? anyone have any solutions on this???
    I have tried this with other marketing document object, such as Sales Order and Invoice, the same problem occured... huh, one more thing, if i did not set the document numbering series, the code is working fine, once i set the document numbering series, then this problem will happen ... hope to hear from you guys ...thanks in advanced!!!

    Hi,
    I suppose the reason of this behavior is that the link button relates using the DocEntry value, and not the DocNum fields value.
    What we usually do is to have 2 columns, on the first the DocEntry, and in the second one the DocNum. Then we set the DocEntry Column´s width to 20, and then only the orange arrow is shown.
    This way, you get the behavior and appearance you need.
    Hope that helps.
    Ibai Peñ

  • Linked button in a Grid (SBO 2005)

    Hy,
    Is it possible to add a linked button in a grid? I saw some posts for linked buttons in a matrix but this doesn't work for me.
    The code that I use to fill the grid is:
                   Item GOrder = form.Items.Item("GOrder");
                   Grid gOrder = ((Grid)(GOrder.Specific));
                   int intCountDatatable = 0;
                   try
                        form.DataSources.DataTables.Item("TOrder").ExecuteQuery(strSQL);
                   catch
                        return;
                   gOrder.DataTable = form.DataSources.DataTables.Item("TOrder");
    If you (all) need more info, just let me know. Hope you can help...
    Joeri

    Hey Joeri!
    My guess it isn't possible; if you look through the UI-API, you'll see that there isn't a BoLinkedObject property, and no possibility to set a column to a linkedbutton type...
    Good luck,
    Rowdy
    PS: Waar was je afgelopen donderdag op de SAP Partner Dag? Behoorlijk interessante/leerzame sessie smiddags met betrekking tot de SDK...

  • Link Button In Grid

    Hai To All,
                 Iam creating reports for my module. For that iam using grid to  display the fields. Now my issue is i want to place the link button(Orange arrow) for specific fields.
    For Example,
    For Supplier Code iam placing the following code so that i can able to get view the link button and if i click i can able to open the Business Partner.
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = 2
    Similar to that i want to create link button for my user defined screen that is my screen.I registered as UDO as "PI_UDO"
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = "PI_UDO"
    If i give "PI_UDO" as my linked object it is not accepting.No error display also....
    If i use none option for linked button,
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = -1
    I cant able to view the link button......
    Weather we can able to create link button for our screen???
    In Forum someone told that we can....But some told as cannot??
    What is the solution for this???
    Its an urgent requirement can anyone help me.......
    Regards,
    Anitha
    Edited by: ani nazir on Jul 30, 2008 11:06 AM

    Thanks Petr,
    If i use like that i can able to open the screen but there is an error
    "No Matching Records found in Business Partner"
    In Matrix Item Link press event i made bubbleevent=false
    Regards,
    Anitha

  • How to add link button in Query generator

    Hi,
    I am trying to add link button in Query reports. While the query is for system table it automatically gives columns with link button  but how to do this for user Tables.

    Hi,
    Even by standard, this is not possible only when you using UDO.
    You can create your form with Matrix, and use FlushToDataSource Method to load large amount of data inside. Now you can program the linked button click (et_MATRIX_LINK_PRESSED) by columns.
    Regards,
    J.

  • How to add linked button in grid?

    Hi,
    Does anyone know how to add linked button in a grid? I can't find it but i saw someone ask similar question but seems none of them works.
    Thanks a lot!
    P.S. For some reason, i can't use matrix because the data is from a SQL query.
    Lan

    Hi,
    as far as I know it is not possible, since this adjustment is made for the whole column. I have created a grid and I open the shown document by double clicking the row header. In the grid I can see if it is sales or purchase and so I use a workaround by opening the specific system form (e.g. sales invoice) in find mode and search the document by document number (also shown in the grid).
    Sample:
    oSBOapp.ActivateMenuItem("2053"); //sales invoice
    oForm = oSBOapp.Forms.ActiveForm;
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
    oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("8").Specific;
    oEdit.Value = Convert.ToString(dNum);
    oForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
    By the click event, you get the specific row number. Hope it helps...
    Regards
    Sebastian

  • Document Linked Buttons.

    Hi all,
    SBO/SDK 2004 Patch 30.
    Couple of questions re: linked buttons.
    I'm loading a user form via xml that contains a matrix with linked button columns - separate columns for different document types e.g. invoices, credit notes, payments, journals. The linked buttons work fine in this way but:
    1. I would like to have different link button types in the one column i.e. I want to drill back to invoices/credits from the one column (and not via the Journal ID).
    2. The document drill back only works when you supply the DocEntry and not the DocNum. This isn't much use to a customer who can't recognise the invoice number.
    Is it possible to drill back to an invoice (or any non-journal document) using the DocNum? Maybe if I could display the DocNum, trap the linked button event and pass the DocEntry to it?
    Thanks in advance for any help!
    Regards,
    Andrew.

    Andrew,
    If you look at the "MatrixandDataSource" sample code that is located in Samples\COM UI folder as part of the installation of the Business One SDK ... there is a good example of how to use the Linked Button (arrows) to drill back from the customer card code to the Business Partner Record.
    Hope that helps,
    Eddy

  • Choose From List and Golden arrow link in System Matrix UDF column

    I'm wondering if there is a way through the SDK to create a 'Choose From List' and Golden arrow linked button in a System Matrix UDF column? 
    For example the Item Code in a sales order matrix does both.

    Hi,
    Try this code for adding CFL.             
                   SAPbouiCOM.ChooseFromListCollection oCFLs = null;
                    SAPbouiCOM.Conditions oCons = null;
                    SAPbouiCOM.Condition oCon = null;
                    oCFLs = oForm.ChooseFromLists;
                    SAPbouiCOM.ChooseFromList oCFL = null;
                    SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
                    oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
                    oCFLCreationParams.MultiSelection = false;
                    oCFLCreationParams.ObjectType = "object id ";
                    oCFLCreationParams.UniqueID = "CFL1";
                    oCFL = oCFLs.Add( oCFLCreationParams );
                   oColumn.ChooseFromListUID = "CFL1";
                  //where oColumn is the instance of that column.
    Hope u will get help....
    Thanks and Regards,
    Lalit

  • Link Button to User Table

    Hi. I have tried to search for this but cant get anything. I know how to add a link button to a matrix column when the link is to an SBO Business Object. what i need to do is to add add a link button to a user table.

    Hi,
       Sorry for delayed reply. I will be active in weekends.
    STEP 1: Catch The Event
    STEP 2: Load The New Form using code and Keep the form invisible
    STEP 3: Assign The Key Value To The form through your coding
    STEP 4: Navigate to Key value through code/write logic to get retrive details for given Key value of scree
    STEP 5: Make the form visible.
    HTH.
    With Regards
    B.Ravi Shankar

Maybe you are looking for