📚 SAP Business One SDK Help

GetCurrencyRate Sample
See Also

Description

The following sample code shows how to get the currency rate.
Public Sub TestMethod_GetCurrencyRate(ByVal currency As String, ByVal refDate As Date)
    Dim vObj As SAPbobsCOM.SBObob
    Dim rs As SAPbobsCOM.Recordset
    Dim strResult As String
    Dim errResult As String
    Set vObj =m_company. GetBusinessObject(BoBridge)
    Set rs =m_company. GetBusinessObject(BoRecordset)
    Set rs = vObj.GetCurrencyRate(currency, refDate)
    strResult = RecorsetToText(rs)
    errResult = GetLastErrorString()
    OutputMessage(strResult, errResult)
End Sub