cancel
Showing results for 
Search instead for 
Did you mean: 

AddOn Item Event Problem

Former Member
0 Kudos

Hi @all,

I have created an AddOn that adds an additional menu and loads a new form from XML.

The form has two buttons for different functionalities. During the development the AddOn works without problems and all events are captured correctly.

Now, I created the AddOn setup with the Simple AddOnInstaller Wizard form the B1DE and installed it as a new AddOn <b>(System: SBO 2005 SP01 PL11)</b>.

The AddOn starts correctly, creates the menu and opens the form from XML but when I press one of the buttons nothing happens.

I used the following code to capture the item event:

 If pVal.ItemUID = "btnSelect" And _
            (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
            (pVal.BeforeAction = True) Then
            .....
          End If

Perhaps someone can help me with that problem??

Accepted Solutions (1)

Accepted Solutions (1)

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Most likely you get an exception, maybe because you cannot find the XML files.

Profile your addon with B1 .NET Profiler. Part of B1TE, you can get it from SDN

under Business One SDK Tools.

Former Member
0 Kudos

I profiled my addon wiht the B1 .NET Profiler and I receive the following exceptions when I click on a button in the new form:

System.IO.FileNotFoundException

System.IO.FileNotFoundException

System.Reflection.TargetInvocationException

Unfortunately I don't know which file is meant because all needed files (XML, DLL) exist in the addon directory.

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Exactly. Most likely your addon cannot find the XML form. Check with your

code whether this file is located in the right location.

Former Member
0 Kudos

Thanks for your help Gianluigi. I solved the problem with the files now. The XML file wasn't the problem.

Since I also use Word from within SBO and the setup project didn't have a link to the Word DLLs the addon throws the file execption. Now I added the Word DLLs to my project and it runs without any problems.

Answers (0)