cancel
Showing results for 
Search instead for 
Did you mean: 

Add-on Connection

former_member442458
Participant
0 Kudos

Hi Expert

I have some problem with  to load an Add-on

At my customer  SB1 8.81 PL09 I load few add-on in order:

  • B1UP,
  • CoreSuite
  • ,Intrastat,
  • FixedAsset,
  • My Addon 

when i start SAp Business One .All add-on are loaded Automatically.

SAP Business One stop the load of my add-on by a message (Restart add-on, Continue without add-on ,Deonnect of society)  as long as B1Up isn't load totally.

have you an idea to know this problem?

To connect my Add-on i use the follow code:

Dim sConnectionString As String

        SboGuiApi = New SAPbouiCOM.SboGuiApi

        '// by following the steps specified above, the following

        '// statment should be suficient for either development or run mode

        If Environment.GetCommandLineArgs.Length > 1 Then

            sConnectionString = Environment.GetCommandLineArgs(1)

        Else

            sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056"

        End If

        '// connect to a running SBO Application

        SboGuiApi.Connect(sConnectionString)

        '// get an initialized application object

        SBOAppli = SboGuiApi.GetApplication()

If you have a solution to resolve my problem I Buy it ( free naturally)!

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

maik_delly
Active Contributor
0 Kudos

Hi Jean Marc,

are you doing any other operations on startup like setting eventhandlers, make SQL queries etc. ?

Apart from that, I think your line

If Environment.GetCommandLineArgs.Length > 1 Then

should be

If Environment.GetCommandLineArgs.Length > 0 Then

regards,

Maik


former_member442458
Participant
0 Kudos

Hi Maik

I am just start SAP Business One!

I try to change my line code by your

I will test it quickly and I say to you the result!!

regards

former_member442458
Participant
0 Kudos

Hi Maik

sorry for the time of my answer but i change my line code and the result it's the same !

I have the same erro  ( I must restart the add-on)

maik_delly
Active Contributor
0 Kudos

Hi,

first of all I'm sorry - I was wrong. You are using GetCommandLineArgs where the first element is the file name - your code was right.

So problem is somewhere else.

Is it running from Visual Studio ( Debug mode ) ?

Is there any other code before or after connect that is executed on startup ?

regards,

Maik

former_member442458
Participant
0 Kudos

Hi Maik

Thank's for your answer!

Yes after the startup add-onn and connect on the database, my add-on execute a code to verify if userfields or users tables  are created (if not it creat them) and it initialize some data

regards

jean Marc

Former Member
0 Kudos

Hi Jean-Marc,

There should be an exception firing... I would enclose the initialization code into a try - catch block and display the Exception.Message. By the way, it will also allow you to get the DI-API error code and description.

Mays you post the initialization code for your addon?

Regards,

Eric

former_member442458
Participant
0 Kudos

Hi Eric

I will try to catch the error message  and i come back to give you the result

thank's

regards

Jean marc

former_member442458
Participant
0 Kudos

Hi eric

I'm modify my code with insert a catch exception

I find an error because, I search, in y code a B1Up menu and it didn't find it

I have insert an line code to wait for B1up connect totally  and now it's coorect

All add-on  start normally!

Thank's for your Help

Regards

Jean Marc