Welcome Notes

Welcome Viewers

13 April 2017

Get DataSource Value SAP B1

Dear All,
   Today, we will see How to get DataSource Value in SAP Business One.
Code Here,


    Friend Function GetDataSourceValue(ByVal oForm As SAPbouiCOM.Form, ByVal odbSoruce As Object, ByVal odbAlias As Object) As String

        Dim oDBDataSource As SAPbouiCOM.DBDataSource = Nothing

        Dim strRetValue As String = String.Empty

        oDBDataSource = oForm.DataSources.DBDataSources.Item(odbSoruce)

        With oDBDataSource

            strRetValue = .GetValue(odbAlias, 0)

        End With



        Return strRetValue

    End Function