cancel
Showing results for 
Search instead for 
Did you mean: 

AddOn Restart Message

Former Member
0 Kudos

Hello,

I've developed a form and I registered the addon also.

But, the problem is ---if I open SAPB1 it's showing the message to restart the addon. After restarting the AddOn is running OK but it's really a bug.

(I've done the Filtering.)

Whereas another form as addon is running properly.

How will I solve it?

Rgds

Subrata

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Subrata,

Maybe you can debug your form in your programming-environment and take a better look at your code.

Did you use the SAP addon wizard? Which version of SBO and patch level you use?

Good luck!

Best regards,

Teun Aben

Former Member
0 Kudos

When I debug from my programme environment, it is running properly.

But, after AddOn registration the problem occurs.

I've not done the programming in SAP B1 Environment.

But, I've created the Installer program in

SAP B1 AddOn Installer .Net Wizard.

I'm using SAP Business One 2005B-

SP:00 PL 35

Basically, Like Sales-A/R , I've built a module "Dealer".

And under "Dealer" there are multiple form . I've created and debug all forms in programming environment.

But, after AddOn registration first form under "Dealer" Module is running properly, but all other forms those are using the unique menue id of first form shows "Addon Restart" message after afew times of opening the AddOn.

The line I used in each form under the first form.....

oMenuItem = SBO_Application.Menus.Item("SM_DMID")

whereas "SM_DMID" is the Unique Id of First form under "Dealer" module.

Thanks

Rgds

Subrata

Former Member
0 Kudos

Try something like this:

// INIT CONNECTIONS

retCode = B1Connections.Init(connStr, addOnIdentifierStr, diRequired);

// CONNECTION FAILED - TRY AGAIN... 😛

if ((retCode != 0))

{

System.Threading.Thread.Sleep(2000);

retCode = B1Connections.Init(connStr, addOnIdentifierStr, diRequired);

// ...AND AGAIN...

if ((retCode != 0))

{

System.Threading.Thread.Sleep(5000);

retCode = B1Connections.Init(connStr, addOnIdentifierStr, diRequired);

// UPS

if ((retCode != 0))

{

System.Windows.Forms.MessageBox.Show("ERROR (" + retCode + "): " + B1Connections.diCompany.GetLastErrorDescription());

return;

}

}

}

Former Member
0 Kudos

Hello,

I didn't understand your code and where will I write these?

I didn't find function Init () out in SAP BO SDK.

Bye

Subrata

Former Member
0 Kudos

Sorry, I thought you are using B1DE.

So try something like that:

int ret = 0;

// INIT CONNECTIONS

ret = company.Connect();

// CONNECTION FAILED - TRY AGAIN... 😛

if ((ret != 0))

{

System.Threading.Thread.Sleep(2000);

ret = company.Connect();

// ...AND AGAIN...

if ((ret != 0))

{

System.Threading.Thread.Sleep(5000);

ret = company.Connect();

// UPS

if ((ret != 0))

{

System.Windows.Forms.MessageBox.Show("ERROR (" + retCode + "): " + company.GetLastErrorDescription());

return;

}

}

}

Former Member
0 Kudos

Hello Marek Roszatycki ,

I did it, but not solved yet.

After each 5/10 minutes the AddOn shows me a message of "Restarting the AddOn".

After restarting it was running perfectly .

And Now after adding your code it shows me the

"ERROR(0):Unknown Session " and itemevents are not working whereas form opens.

I can't understand.

Need Help.

Rgds

Subrata

Edited by: Subrata Chatterjee on Jan 8, 2008 6:22 AM

Answers (1)

Answers (1)

Former Member
0 Kudos

Is it the only AddOn you start with SBO?