Skip to Content
author's profile photo Former Member
Former Member

UI Databrowser example


Databrowser of B1 helpfile do not provide an example.

Can anyone provide an example for me?

Can this databrowser link with UDT?



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 18, 2008 at 08:44 AM

    Hi Wong

    Please refer to the below sample code.

    Private Sub DataBrowserOperations()
        '// A Data Browser object can not be created, it is invoked
        '// as a property of a business object.
        '// The BusinessPartners object is used to demonstrate the
        '// use of a DataBrowser object
        Dim BusinessPartners As SAPbobsCOM.BusinessPartners
        '// A DataBrowser object contains a Recordset object.
        '// Because a DataBrowser Object can not be created,
        '// a Recordset Object should be created and then assigned
        '// (linked) to the Recordset Property of the DataBrowser
        Dim oRecordSet As SAPbobsCOM.Recordset
        '// Get a new BusinessPartners object
        Set BusinessPartners = oCompany.GetBusinessObject(oBusinessPartners)
        '// Get a new Recordset object
        Set oRecordSet = oCompany.GetBusinessObject(BoRecordset)
        '// Perform the SELECT statement.
        '// The query result will be loaded
        '// into the Recordset object
        oRecordSet.DoQuery ("Select cardcode from ocrd where cardtype = 'C'")
        '// Asign (link) the Recordset object
        '// to the Browser.Recordset property
        BusinessPartners.Browser.Recordset = oRecordSet
        '// Access the data
        '// Once the Browser points to a row in the
        '// result set you can use the properties directly
        '//Get the next Business Partner
        If BusinessPartners.Browser.EOF = False Then
        End If
        '//Get the previous Business Partner
        If BusinessPartners.Browser.BoF = False Then
        End If
    End Sub 


    Syn Qin

    SAP Business One Forums Team

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      You can do it by code, as Vasu showed you, or you can do it in the XML file like this:

         <DataBrowser BrowseBy="DocNum"></DataBrowser>
         <Settings Enabled="1" MatrixUID="mtx_NR" EnableRowFormat="0"></Settings>


      Vítor Vieira

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 05:24 AM

    Finally I use record set to do it. Thank for everyone

    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.