In this post, I'm going to explain how I created my first SAP Business One Add-On Project using Visual Studio 2013.
Before progressing ahead you must verify the prerequisites mentioned in this
SAP Community Page.
After you have installed the SAP Business One studio, make a search in the start menu.
- SAP Business One Studio (32-bit), is the SAP in-build IDE provided for Add-on development.
- SAP Business One Studio for Microsoft Visual Studio 2013 opens up the visual studio 2013
If you want to create the add-on from a Package generated by the "SAP Business One Studio" go ahead with the "SAP Business One Add-On Project From B1s File" project type and Visual Studio will prompt you to browse your '
b1s' file.
Select "SAP Business One Add-On Project", and you will get an SAP Business One to look and feel form as below.
When you start debugging the project you will be hit with the below exception.
The reason was I haven't opened up the SAP Business One Client (32-bit) before starting the debugging process.
I have updated the Title property of Form1 as "Hello Sap B1" and pressed F5.
1- My add-on is listed under the Modules of the Main Menu.
2- Form1 will be visible when you click on Hello_SAP_B1.
3-When Form1 is clicked, you could see your form inside the SAP Business One.
Then open the
Menu.cs file, according to my understanding the code in this file controls how the add-on is shown in the SAP Business One Client.
I've done a few changes in the
Menu.cs file with the intention of observing how it behaves.
I've changed the name of the package (removed underscore signs), added an extra code block to check and remove if my add-on it is listed in the Main Menu, and changed the display name of my form.
I've got the exact result that I wanted. Then I renamed Form1.b1f in the solution as "HelloB1.b1f" and set the same value for Unique ID. (Note::this change is indicated in the Menu.cs file code change by a red arrow).
oCreationPackage.UniqueID = "Hello_SAP_B1.HelloB1";
If you debug the project at this stage your form will be listed in the main menu but will not be popped out. Luckily I could find out what was the reason by observing the
HelloB1.b1f.cs file.
Even I have renamed the Form from Solution Explorer, which has not renamed the name of the behind class and certain annotation properties. So I've altered "Form1" with "HelloB1", as a result, you even will get two compilation issues in
SBO_Application_MenuEvent of Menu.cs class.
After doing the below amendments, I could see my form inside the SAP Business One.
These are the first few experiences that I had with the SAP Business One add-on development, and I believe this post will be informative for all the people who start it for the first time.
I'm pretty sure these PDFs will save a few days of your life.
How to Guide SAP Business One 9.0
SAP Business One – SoftwareDevelopment Kit (SDK)
Web site of Mepa-Data AG