Button as LinkedButton

Hello all,
I'm trying to use a Button object as a LinkedButtton object. in the SDK i saw only an example of linking a column in a matrix.
I don't want to see the LinkedButton mark, but just that my button will function as a link.
The button is inside of purchase and sells forms, and i want to link it to the Account balance form.
is it possible to do so?
Thanks & Regards
Mosh

Hi everybody,
First of all, excuse my bad English (it's not my mother language). Any correction is welcome about this...
I have the same problem. I need a LinkedButton for showing Account Balance Form.
After some tests, I didn't found a solution.
Two partial approaches:
A) Using financial reports (Edy Simon's proposal)
1. When you want to show the Account Balance, Activate Menu Item 13057 (Financial Reports --> G/L Accounts and Business Partners)
2. Get the "Form Type 892" Load Event
3. Get the Form
                Form oForm = Application.Forms.Item(pVal.FormUID);
4. Unchecked the Accounts checkbox
                (oForm.Items.Item("15").Specific as CheckBox).Checked = false;
5.  Fill in the BP Code in Code From and To
                (oForm.Items.Item("6").Specific as EditText).Value = "BPCode";
                (oForm.Items.Item("7").Specific as EditText).Value = "BPCode";
6. Simulate click on the OK Button.
                oForm.Items.Item("1").Click(BoCellClickType.ct_Regular);
Note: For avoiding to execute this code when you launch manually the report (when using the transaction directly), you can use a flag in your code. You can set the flag on in step 1, check its value in step 2 and set the flag off in step 6.
B) Using Business Partners form
1. When you want to show the Account Balance, launch the Business Partner Form (you can do it using Active Menu Item 2561 or using a Linked Button with Object Type = 2)
2. Get the "Form Type 134" Load Event
3. Get the Form
                Form oForm = Application.Forms.Item(pVal.FormUID);
4. Simulate click on the Balance Button
                oForm.Items.Item("33").Click(BoCellClickType.ct_Regular);
Note: You can use the same workaround previously mentioned for avoiding problems when using the transaction directly
Howewer,
In Case A, the report is not the same as Business Partners' Account Balance (sigh)
In Case B, I have not been able to hide/close the Business Partner Form
Hope that helps. Any help is welcome!
Regards,

Similar Messages

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

  • Using link button

    Hi all
    i would like to create a link button which when pressed will show the customer details form for a given customer which appears in a edit text field.
    my question is how do i connect the link button to the edit text field so it will show its details?
    appreciate the help
    Yoav

    Dim oItem as SAPbouiCOM.Item
    Dim oLink As SAPbouiCOM.LinkedButton
    <b>oItem.LinkTo = "TEXTBOX"</b>
    Set oLink = oItem.Specific
    <b>oLink.LinkedObject = lf_BusinessPartner</b>

  • How to add alink button to a textbox

    hi
    i have a textbox with uid 10. i have also binded that to a db table...i just want to add a link button to that text box......
    i have written this piece of code.......but its not working
    oitem = oForm.Items.Item("10")
                oedit = oitem.Specific
                oLink = oedit.ExtendedObject
                oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
                oForm.Items.Item("10").Specific.DataBind.SetBound(True, "@VIDS_MGT", "U_CardCode")

    Shehanaaz try this
    I think u want to add this to system form not throuh screen painter
    sboItem = sboForm.Items.Add("slsLabel2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
                    sboItem2 = sboForm.Items.Item("slsText1")
                    sboItem3 = sboForm.Items.Item("5")
                    sboItem.Left = sboItem2.Left - 99
                    sboItem.Width = "80"
                    sboItem.Top = sboItem3.Top
                    sboItem.Height = "14"
                    sboItem.LinkTo = "slsText1"
                    sboLbl = sboItem.Specific
                    sboLbl.Caption = "Sales Order"
                    sboItem.Visible = True
                    Dim oLink As SAPbouiCOM.LinkedButton
                    sboItem = sboForm.Items.Add("DSCardCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
                    sboItem2 = sboForm.Items.Item("slsText")
                    sboItem.Top = sboItem2.Top
                    sboItem.Left = sboItem.Left + 140
                    sboItem.Width = 20
                    sboItem.LinkTo = "slsText"
                    oLink = sboItem.Specific
                    sboItem.Visible = True
                    oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
    By
    Firos.C

  • Linked Button - lf_profitCenter, Not Working correctly

    Hello Experts
    Can anyone explain why the following code, doesn't work?
    SAPbouiCOM.Item itemLbtnCC;
    SAPbouiCOM.LinkedButton LbtnCC;
    itemLbtnCC = this.Form.Items.Add("lnCC", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
    LbtnCC = (SAPbouiCOM.LinkedButton)(itemLbtnCC.Specific);
    itemLbtnCC.Top = this.Form.Items.Item("5").Top;
    itemLbtnCC.Left = this.Form.Items.Item("5").Left - 16;
    itemLbtnCC.LinkTo = this.Form.Items.Item("5").UniqueID;
    LbtnCC.LinkedObjectType = "61";
    And when the form is loaded returns the following exception:
    Invalid target  [66000-24]
    The problem (the code stops) ,occurs on the linked object 61, however in SDK Help Center , linked object 61 is mapped to lf_ProfitCenter which is the desired object of the custom linked button (Profit Center object).
    Can you please give me an explanation? Is there any work around?
    Kind Regards,
    George

    I found this note:
    1426939 - Can not link to ProfitCenter via LinkedButton
    that offers a workaround for this issue:
    Get error 'Invalid target [66000-24]' when using LinkedButton Object
    to link the ProfitCenter as following code:
    Private oLink As SAPbouiCOM.LinkedButton
    Set oNewItem = oOrderForm.Items.Add("oTest", it_LINKED_BUTTON)
    Set oLink = oNewItem.Specific
    oLink.LinkedObject = lf_ProfitCenter
    The workaround would be as follows:
    - Read the profit centre you want to open into a string variable
    - You can trigger opening the profit centre window by calling the method: oApplicaition.ActivateMenuItem (1793) 'menu id for ProfitCenter in Financials -> Cost Accounting -> Profit Centres
    - Change form to Find mode, Put value from string variable into Profit Centre field and simulate click on Find button
    This issue is an candidate to be fixed in a future version of SAP
    Business One.

  • Problem - get Matrix with LinkedButton

    Hi Guys,
    I have a problem concerning the use of LinkedButton. I am using a LinkedButton Item in a SAPForms that is linked to a EditText Item. The LinkedObject Properties of LinkedButton is set to Business Partner. The LinkedButton is correctly configured and it normaly appears on the form. The only problem is that when I click on the LinkedButton I am getting only one instance of the Business Partner. What I would like to have is the list of all Business Partners in a Matrix items so that I can choose one of them.
    Can someone tell me how to proceed.
    Thanks
    Bop

    Hi Peter,
    I've never used the link button but based on the documentation it does just what you say: navigates to one record. I think what you need is to use, or copy the use of, the SAP "Choose From" form which displays a list for selection. Unfortunately it doesn't seem like this form's functionality is exposed or available to the UI-SDK.
    If you do a search on this forum for "Choose From" you will find a thread describing an attempt to use the existing SBO form but it isn't clear that it was succesful or even the best approach. The thread was started by Yan Li.
    I've got the same problem and it looks like I'm going to have to code my own "Choose From" form for lookups. At least then I will be able to fully control it.
    If anyone knows an good way to make use of the built in functionality and would chime in that would be great.
    - Mel

  • Linked Button To SalesOrder, Error No Matching Record ODBC 2028

    Hello,
    I've added a LinkedButton to a Matrix Cell.
    This is ok.
    But the LinkedButton only works correct with the DocEntry
    Number of SalesOrder ,not with desired DocumentNumber.
    For Example, SalesOrder Document
    DocEntry = 310
    DocumentNumber = 400073
    Entering 310 to matrix cell and clicking the
    LinkedButton, the SalesOrder with DocumentNumber
    400073 will be loaded.
    Entering 400073 to matrix cell and clicking the
    LinkedButton, error ODBC 2028 occurs.
    Has someone an idea, how to link that
    button properly to the DocumentNumber??
    The source
    'adding column
    Set sbo_cOlumn = sbo_Matrix.Columns.Add
                        (UID:="1",Type:=it_LINKED_BUTTON)
    'adding UserDataSource
    oForm.DataSources.UserDataSources.Add UID:="1",
                          DataType:=dt_LONG_NUMBER
    'bind column to UserDataSource
    sbo_cOlumn.DataBind.SetBound
                      Bound:=True, TableName:="", Alias:="1"
    ' create linked Button
    Set sbo_LinkedButton = sbo_cOlumn.ExtendedObject
    sbo_LinkedButton.LinkedObject = lf_Order
    Regards
    Thomas

    Hi,
    I have the same problem with linking to Sales Order.
    Sugesstion to use DocEntry instead of DocNum is correct only partially and it looks user-unfriendly even if you hide DocEntry value and have DocNum in the next column.
    If you open "Inventory/Pick and Pack/Pick List" and select any pick, you can see a standard link to SO's DocNum, not to a DocEntry
    Can please anybody explain how it is done?
    Thank you
    Natalya

  • Link Button to BusinessPartners AccountBalance/Deliveries/Orders

    Hi all,
    Is it possible with sdk to make link buttons such as the ones in the top right of BusinessPartners MasterData form, they are links to
         Account Balance
         deliveries
         orders
    regards,
    Emmanuel

    Dim oLinked As SAPbouiCOM.LinkedButton
    'This is the linked button
            oLinked = oForm.Items("8").Specific
    'this is the edit box
            oForm.Items("5").LinkTo = 8
    'This is setting the Business Object
            oLinked.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
    This is to access a linked button for business parner, if you want to use a different object - just choose it from SAPbouiCOM.BoLinkedObject.

  • Click on Link Button

    Hi All,
    Can anybody tell me how to show form on link button click.
    Means i taken link button and when i will click on link button that time shows another form.
    How ?

    It is a system form or a user defined form.
    In first case you only need to define de object
    Dim oLink As SAPbouiCOM.LinkedButton
    Set oLink = oEditText
    oLink.LinkedObject = lf_BusinessPartner
    If it is a user defined form you need to do everything
    Load Form
    Load Data
    PS
    If this helps, please fill de points for me tks

  • Linked Button object question

    Hey Everyone,
    I have created some code to replicate the choose item functionality for master item data. I take the itemcode selected and put this in a text box.
    How do I use the Linked BUtton object to allow the user to click the yellow arrow and view this object? Do I have to code the click event, etc.. on my own? Or is there built in SDK functions to make this work?
    Any help would be appreciated.

    Hi Laura!
    As i know 'ChooseFromList'-service will be exposed in v2005.
    More at https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/businessone/s-u/sap business one 2005 release notes.htm#_toc103594943
    There is also no any standard method to relate LinkButton and your 'ChooseFromList'-implementation.
    All you need is to handle LinkButton-click and then execute your code for 'ChooseList'.
    The code-scheme in ItemEvent-handler can be like that:
    if (event = ItemPressed && item = LinkedButton)
       myChList = new ChList();
       oEditText.Value = myChList.SelectItem()
    hope it'll help

  • How to manage liked button?

    Hi,
    i saw that i can manage linked button for BP or items etc... but i don't know how to manage linked button in a user form for a user field.
    Thanks
    Valentina Mioli

    Hi Valentina,
    1) Add a edittext and a linkedbutton to your user form.
    2) Link the button to the edittext.
    3) Set the EditText.LinkedObject to to appropiate object (i.e. BusinessPartners is 2)
    4) Fill your edittext with the correct value (i.e. 'C1000')
    The linkedbutton will be clickable and you're set!
    For a matrix just add a column of the type linkedbutton and set the Linkedobject to the correct object.
    A full list of objects and more information and samples can be found in your Help Files (Objects: UI API > Reference > Overview > Enumerations > BoLinkedObject Enumeration)
    Hope it helps,
    Rowdy

  • How create Linked Button on StaticText? Important!

    Hallo
    subject. examlpe: purchase order -> Vendor (Choose from list) and linked button was created in field Vendor (static text)
    Ho to do this? please help and if possible - code (for B1 2004)
    i am read this topic, but nothing was not got
    Re: Add linked button to a editText field

    SAP often use hacks to make their linkedButtons, and this is one of them...
    Normally Linked buttons only support EditText and Comboboxes...
    A workaround I'll would guess would be to:
    1 - Add the staticText
    2 - Add a hidden editText
    3 - Link a linkbutton to the hidden edittext, and make it of type ln_None
    4 - Add a value to the hidden edit text (Else the linkedbutton will not be shown)
    5 - Catch the event of press of the linkedbutton (ItemPressed), and do a manual opening of what you might need to open.
    Haven't had time to test this, but guess it will work..
    An other and more pretty option would be to use a disabled editText...

  • LinkedButton in Grid = DocEntry diff. from DocNum

    Hy All,
    I am using a Grid to display data from the ORDR etc.... Now I want to add a linked button to the docnum. But the docnum is not the same number as the docentry...
    I know that the docentry is the key but is there a way how I can use the docnum, for user-friendly-ness, with the linked button... The DocEntry doesn't ring a bell with the customer, the docnum does...
    Greets,
    Joeri

    Hi Joeri,
    Please have a look at this thread:
    LinkedButton - show DocNum but link using DocEntry?
    Kind Regards,
    Owen

Maybe you are looking for