on 05-08-2017 9:07 AM - last edited on 02-03-2024 10:29 PM by postmig_api_4
Hello everybody,
I have developed an add-on using Business One Studio for Visual Studio and have packed it using the ExtensionPackage tool of SDK(including .exe file, .b1s file and a .b1f file which is a custom form I use). Then I uploaded my add-on using the Extension Manager in manual start up mode. When I run SAP Business One and try to start my add-on from Add-On Manager I get an error saying "Add-on connection timed out.", add-on status is "Failed" but my add-on runs normally.
If I choose to set add-on start up mode "Automatic", then add-on runs with no errors but in Add-On Manager the status is "Connecting" and never changes.
Why is this happening? Is SAP Business One Studio for Visual Studio fault?
Kind regards,
Dimitris Theotokatos
Hi Dimitris,
Can you post you addon connection code? There was some post regarding the same issue and they were using the development connection string to try to connect. Normally, when in production, you should use the connection string on the command line args.
Perhaps that is the same issue?
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If I'm not mistaken new SAPbouiCOM.Framework.Application(); uses the development connection string.
Extract the connection from the command line arguments and pass it as an argument to the constructor:
private const string DevConnString = @"0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056";
private string GetConnectionString()
{
var args = Environment.GetCommandLineArgs();
if (args.Length < 2 || !args[0].Contains("SAP Business One"))
{
return DevConnString;
}
return args[1];
}
SAPbouiCOM.Framework.Application oApp = new SAPbouiCOM.Framework.Application(GetConnectionString());
Pedro Magueija
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.