cancel
Showing results for 
Search instead for 
Did you mean: 

Recordset does not work in client machine except server, SAP B1 Addon

former_member183402
Participant
0 Kudos

Hi all,

I have a big problem related to SAP B1 Addon where I build Addon which works fine in the server but it does not work in client machine

Cause

If I create addon which needs to connect to database for example, to add journal voucher it works fine in the server but it does not work in client machine where it displays message. Add-on Name here is disconnected. Please contact: schadrack.rurangwa@abcrwanda.com

Restart Add-on

Log off the current company

Continue working without this add-on

If I use below codes of connection, addon works fine in server but it does not work in client

 Private Sub SetApplication()
        Dim SboGuiApi As SAPbouiCOM.SboGuiApi
        Dim sConnectionString As String
        SboGuiApi = New SAPbouiCOM.SboGuiApi()
        sConnectionString = Command()
        SboGuiApi.Connect(sConnectionString)
        SBO_Application = SboGuiApi.GetApplication()
        oCompany = New SAPbobsCOM.Company
        Dim Cookie As String = oCompany.GetContextCookie()
        Dim conStr As String = SBO_Application.Company.GetConnectionContext(Cookie)
        oCompany.SetSboLoginContext(conStr)
        oCompany.Connect()

        oUsrTbl = oCompany.UserTables.Item("VIDS")         'connection of   VIDS table works only to the server, where  client machine brings the following message.  Add-on Name here is disconnected. Please contact: schadrack.rurangwa@abcrwanda.com
    End Sub

If I use below codes of to take data from query, same message is displayed. Add-on Name here is disconnected. Please contact: schadrack.rurangwa@abcrwanda.com

'To take journal Series
Dim oRecSet As SAPbobsCOM.Recordset
oRecSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oRecSet.DoQuery("SELECT top 1 T0.[Series] FROM NNM1 T0 WHERE T0.[ObjectCode] =30 order by T0.[Series] desc")

All other addons I create which do not use Recordset work fine in both server and client machine

How can I solve this problem?

Please anyone can help me

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rurangwa Schadrack,

The issue is caused by a corrupt DI API installation. In order to resolve the issue:

1. Make sure that the DI API version on the client machine is same as on Server machine.

2. Make sure that the DI API is installed using built-in Administrator user.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

former_member183402
Participant
0 Kudos

Thank you so much ANKIT, Now my addon is working fine

Answers (0)