Link button in grid column to UDO

Hi,
I read through the posts regarding linking to user-defined objects, but I found it very confusing.  Some posts say that it is not possible to create a link button to a UDO; others say you need to use the extended-object property. 
Does anyone have code that I could use to designate a grid column as a link to a UDO?
The code I'm using is:
oGrid.Columns.Item(1).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
txtColumn = oGrid.Columns.Item(1)
txtColumn.Width = 83
txtColumn.LinkedObjectType = ???
I need to fill in the "???".
If I designate an SAP B1 object type it works.
Thanks,
Mike

Rasmus,
Thanks for taking the time to provide a detailed explanation.  I think though that SAP needs to solve these kinds of problems.  It is my understanding that the main design goal of Business One is to provide an infrastructure that would reliably enable customization around it.  There is no such thing as accounting software that does not need some kind of adaptation to make it work for specific kinds of business models.  So a design that makes customization easier makes a great deal of sense. 
If it is necessary to improvise in order to do what you need, then this design goal has not been met.  It also means that Business One is not what is managing the process because you are effectively going around it.  This in my view is actually worse than if Business One made these links work.  By forcing us to go around it, we effectively loose the data protection that Business One should be providing.  This is my take on it anyway.
We solved the problem by opening the appropriate form with the appropriate data in it by using the double-click event.  The reason we have to do it this way is because the SDK will not even display the link button in a grid if its target is a UDO.  This brings up another reason for the SDK to be more cooperative with these efforts.  SAP has provided a detailed document describing the need to not deviate from Business One’s look and feel.  Perhaps SAP needs also to provide an SDK that more reliably and easily enables that caveat.
If Business One had been designed from the ground up using SOA, its original design goal would be a lot easier to meet.  Maybe this is the real problem.
Thanks,
Mike

Similar Messages

  • Link button on Grid

    Hi everybody:
       Just I'd like to know if I can have a link button in a grid object, such as it exists in the matrix object, an how i can get it.
       Thanks in formward
      Regards.
      Misael Reséndiz.

    Misael,
    If you use the Search feature in this forum on "link button on grid", you should find many helpful posts such as this one ...
    Link button in Grid
    Eddy

  • 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 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

  • 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

  • Linked Button in Grid

    Is it possible to have a linked button (drill down) in a gird object?

    Hi,
    Can you put this code too:
    SAPbouiCOM.EditTextColumn oEditCol;
    oEditCol = ((SAPbouiCOM.EditTextColumn)(oGrid.Columns.Item("Column Name")));
    oEditCol.LinkedObjectType = "X";
    For example, in C# :
    SAPbouiCOM.EditTextColumn oEditCol;
    oEditCol = ((SAPbouiCOM.EditTextColumn)(oGrid.Columns.Item(0)));
    oEditCol.LinkedObjectType = "2";

  • Link Button to UDO in my Grid

    hi,
    is ther a way to implement a link button im my Grid Column and bind it to an existing UDO ?
    I'm using SBO 2007A SP00 PL37.
    the following code, shows the link button and links to an item
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    i tried to link to my udo by the following but without success:
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = "UDO_VM_CONTRACT"
    I'm looking for a way of direct linking. Now i try to do the following workaround, but maybe there is a better way to solve this problem:
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                            If pVal.BeforeAction = False Then
                                BubbleEvent = False
                                moSboApplication.ActivateMenuItem("VmContract")
                            End If
    best regards
    Markus
    Edited by: Markus Rewak on Jul 10, 2008 11:11 PM
    Edited by: Markus Rewak on Jul 10, 2008 11:12 PM

    Hi Madhu,
    the udo object type is not working. To get the drill down functionality you have to use the item-object (4) and catch the matrix link pressed event and search the udo by your own logic.
    ' Add a link button to a column
            oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                                If pVal.ColUID = "Vnr" And pVal.BeforeAction = True Then
                                    BubbleEvent = False
                                Dim sLink As String
                                Dim oGrid As SAPbouiCOM.Grid
                                oGrid = oForm.Items.Item("Gcont").Specific
                                oGrid.DataTable = oForm.DataSources.DataTables.Item("DTcont")
                                sLink = oGrid.DataTable.GetValue(0, pVal.Row)
                                moSboApplication.ActivateMenuItem("VMarkus")
                                moSboApplication.Forms.ActiveForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                moSboApplication.Forms.ActiveForm.ActiveItem = "txtdocnum"
                                moSboApplication.Forms.ActiveForm.Items.Item("txtdocnum").Specific.value = sLink
                                moSboApplication.Forms.ActiveForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                                End If
                    End Select
    This works very well.
    have fun
    Markus

  • UDO - Link button

    Hi,
    I have my custom designed form.
    Can I add a 'Orange Link arrow' for an UDO in it?
    I could do it for the system objects.
    When I tried it in the screen painter, I got the error 'Invalid Numeric Value'.
    Thanks in advance.
    Regards,
    Geetha

    Hi Geetha,
    I don't think UDOs are supported for link buttons (or should I say, I can't get it to work ) so you'll need to code it yourself. If you trap the event of the user clicking on the link button, you can open your UDO form in Find mode, populate the key field and click the Find button.
    Kind Regards,
    Owen

  • Problem with Link Button

    Hi
    I've got a linked button in a column within a matrix that shows Sales Order Document Numbers. I've set it to link to the Sales Order form using the following code:
            oColumn = oColumns.Add("OrderNum", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
            oColumn.TitleObject.Caption = "Order Number"
            oColumn.Width = 200
            oColumn.Editable = False
            oLink = oColumn.ExtendedObject
            oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Order
    The problem I've got though is that if the Sales Order is created with a manually entered Document Number I get the following error when clicking on the linked button.:
    "You are not permitted to perform this action [Message 200-30]"
    I guess the reason it is happening is that the DocEntry and DocNum are different and the Linked Button is using the DocEntry as reference to which Sales Order needs to be opened when the linked button is pressed.
    Is there anyway to stop this from happening and for the Linked Button to function as normal even if the Sales Order has a manually entered document number? So is there a way to allow the Linked Button to link through to a Sales Order using the DocNum not the DocEntry?
    Steve

    Cheers mate. I've just tried setting using the PressLink property of the EditTextColumn object however it's not letting me set the EditTextColumn to the column I have in my matrix. The code I have is:
                                            Dim b As SAPbouiCOM.Column
                                            Dim oEditTC As SAPbouiCOM.EditTextColumn
                                            Try
                                                If pVal.Before_Action = False Then
                                                    oForm.Freeze(True)
                                                    oEditTC = oMatrix.Columns.Item("DocEntry")
                                                    oEditTC.Visible = True
                                                    oEditTC.PressLink(pVal.Row)
                                                    oEditTC.Visible = False
                                                    oForm.Freeze(False)
                                                End If
                                            Catch test As Exception
                                                MsgBox(test.Message)
                                            End Try
    The error I am getting is "Specified Cast Is Not Valid". The type of column I am trying to bind to is a "it_LINKED_BUTTON".
    Steve

  • Link button in a grid column

    hi friends,
    I am trying to insert a link button in my grid (column1)
    I created  a user form with a grid.
    Now in that grid (first column) i want to insert a link button,which will call a system form(like sales order screen)
    i'm pasting piece of code (vb.net)related to my grid
    so plz send me code how to get link button in my grid and where i can insert that code
    ' Add a Grid item to the form
            oItem = oForm.Items.Add("MyGrid", SAPbouiCOM.BoFormItemTypes.it_GRID)
            ' Set the grid dimentions and position
            oItem.Left = 20
            oItem.Top = 100
            oItem.Width = 520
            oItem.Height = 300
            ' Set the grid data
            oGrid = oItem.Specific
            oForm.DataSources.DataTables.Add("MyDataTable")
            oForm.DataSources.DataTables.Item(0).ExecuteQuery("select DocNum from [@SALCO_H]")
            oGrid.DataTable = oForm.DataSources.DataTables.Item("MyDataTable")
            ' Set columns size
            oGrid.Columns.Item(0).Width = 50
            'oGrid.Columns.Item(1).Width = 60
            'oGrid.Columns.Item(2).Width = 130
            ' Get the added form object by using the form's UID
            oForm = SBO_Application.Forms.Item("frmGrid")
    Thanks & Regards
    SARAN

    Thenks for u r reply , i gone through that link it is helpful for me but still i have a problem,
    now i'm getting linkbutton but it is not performing any function,though i gave the code for that link button and related screen id like <b>2</b> for business partner or like <b>bplist</b>
    and <b>one more problem</b> i was facing with grid is
    i created a grid in my user screen and i want to get the <b>form settings</b> for that grid(if i click <b>(tools--->form settings)</b>.then it display form settings screen for perticular userscreen.
    is it possible to get form settings for a screen having grid
    Thanks & regards
    SARAN

  • 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

    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

  • 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 to open an UDO Object Form

    hi
      I was trying to open my udo form using a link button in a data grid. But i just cannot link the object.It is working fine with system forms.But i just want to know how to link an UDO Object.

    hai Manish,
             you just catch the row you clicked and get the data with your linkbutton which you have clicked then activate your UDF                     (by activating menu event) and then perform the find action according to the data.......
    i hope this helps .....
    Regards.....
    Chethan B.E.
    9342504047
    [email protected]

  • Link button for udo in the xml

    Hi all ,
    I know how to link a system object like this.
    <column AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" editable="1" font_size="12" forecolor="-1" right_just="0" text_style="0" title="Code" type="116" uid="202" visible="1" width="80">
                                                           <databind alias="U_ItemCode" databound="1" table="@APS1"/>
                                                           <ExtendedObject linkedObject="4"/>
                                                      </column>
    but how can I link a UDO ? if My UDO' name is MUDO ,I  write the XML like this,
    <ExtendedObject linkedObject="MUDO"/>
    and I always got error . who know ?
    thanks

    Hi Wei,
    That's because you can't link to UDO's. There is no object type for an UDO. You should use onject type NONE and make the logic behind it yourself. (Capture the linked button press event and handle all actions)
    Hope this helps,
    Rowdy

  • How to set Link object type to grid column??

    Hello friends ,
                    I m using C# language. I want to set LinkedObjectType to the grid columns.So how can I set the Linked Obj type to the grid column?
    Reguards ,
      Mithun

    Hi,
    it should look like this.
    oGrid.Columns.Item(ColUID).Type = BoGridColumnType.gct_EditText;
    EditTextColumn col = (EditTextColumn)oGrid.Columns.Item(ColUID);
    col.LinkedObjectType = "2"; // Link to BusinessPartner
    lgDavid

Maybe you are looking for

  • Line Chart From SQL in 10g

    I need to have a Line Chart from SQL in Oracle 10g Grid Control for the below Scenario I had total counts for Messages stuck in the Oracle queue table using one UDM alert and i have total counts for messages stuck more than 15 min using another UDM a

  • Information on Business Process Monitoring

    Hello experts, I want to know if there is a way to monitor spool jobs in business process monitoring or other tool? I assume that I can monitor background jobs with BPMon but I don't find where I can monitor the content of the spool generated by the

  • Checkbox DataGrid Item Render Issue

    I have a DataGrid component that has a column with a checkbox item render. The code at the end of this post is identical to the code at the bottom of the tutorial on this page: Tutorial The creation complete method calls a PHP function using the AMFP

  • Setting brightness level up (automatically) at GDM (or other DM) level

    I would like to set up (maybe write a script?) that will set my monitor's brightness to 100% immediately after GDM (my display manager) will start... I know there are ways to automatically set up full brightness in GNOME itself, but these are usually

  • Strange SAP XI mapping UserDefine function - 'syncTexts' and 'first'

    Hi, In the SAP standard OrderCreate_OrdersOrders05 XI map, there is a strange node logic at /ORDERS05/IDOC/E1EDP01/E1EDP19, the source is /OrderCreate/OrderCreateBody/OrderCreateDetails/OrderCreateProductLineItem/ProductIdentification. There are SAP