B1DE 1.3 AddOnInstallerSetup defining AddOnInstaller

I have installed the B1De 1.3 for VS2005.
I want to use the B1 AddOnInstaller Setup to create a setup solution to include a visual studio setup project.
When I create the project using the wizard the Setup project can not be loaded and the following error is displayed "Cannot add the link because the source file '[Projects Folder]\[Solution Name]\Setup\Release\Setup.msi' cannot be found."
I ignore this and reopen the solution. The Setup Project has not been created so I add my own. I then follow all the instructions on the TODO list. However, I can not compile the solution because of the Error "Type 'AddOnInstaller.AddOnInstallInfo' is not defined." which occurs 5 times in SubMain.vb and 4 times in CustomInstallerClass.vb
How should this be defined?

Hi Trinidad,
In the other message thread you posted:
1)
I don't understand why you have the error but at least I know what is trying to do when you have the error.
The Installer Wizard does the following steps:
1. Creates the solution
2. Creates the main project (<installer name>)
3. Creates the Customer Library
4. Creates the Setup project
5. Compiles the solution
6. Adds the Setup.exe and Setup.msi files as "Embeded Resource" in the main project <installer name>
7. Creates a directory called AddOnRegDataGenFile with a .bat and a .xml file to create the .ard file
As in your case the installer fails in step 6 a workaround could be to do the remaining steps by hand.
I think what is missing in what you did is step 6. So after adding the setup project to the solution and compiling the solution please add the Setup.exe and Setup.msi files inside the main project with the property "Embeded Resource".
After that you can follow the TODO.txt steps.
Form this I understand that to get it work, for step 6 I need to build the Setup Project and add the setup.exe and setup.msi files to the main project as embedded resources.
1. If I build the setup.exe and setup.msi files before completing the TODO.txt steps then surely they will not be correct?
2. If I complete the TODO.txt steps first I can not build the Setup project as the Error "Type 'AddOnInstaller.AddOnInstallInfo' is not defined." is present in the CustomInstallerClass.vb which is now a dependency of the Setup project?
Thanks in advance

Similar Messages

  • Problem in creation of ARD using B1DE 1.5

    Hi Experts
    I have develop an AddOn using B1DE 1.5. It is working properly. Now I want to create ARD file of addon . I use 'SAP B1 AddOnInstaller.Net wizard to create ARD file. I follow all the setps of wizard. It finish without any error. But it does not create ARD file in Bin folder. What can be problem ? Please suggest me.
    Thanks
    Regards
    Jitender

    Jitender,
    You could manually create the ARD file by using the AddOnRegDataGen.exe.  If you search the SDK Help file for "Create a Registration Data File", you will find the documentation that tells you how to do this.
    With respect to B1DE ... if you actually go to the folder where you save your projects and open the installer project you created, as an example ...\Documents\Visual Studio 2008\Projects\B1AddOnInstallerNET1\B1AddOnInstallerNET1\B1AddOnInstallerNET1\
    ... in the ...\AddOnRegDataGenFile there should be an AddOnRegDataGen.bat file.  You can try to also manually execute this to see if the .ARD file gets created.  If it still does not it could be due to a pathing issue .bat file.  You may want to check that the paths are correct.
    Again ... worst case you can manually create the .ARD file as stated above.
    Eddy

  • Error in B1DE during creation of a professional installer (VS2005/SAP2005)

    Hi, few weeks ago, I created a professional installer for my add-on with the B1DE for SAP 2004. Now, I have to create exactly the same professional instaler for SAP 2005 (and VS2005), but I have some problems.
    First: When I execute the 'VB B1 AddOnInstaller Setup .NET' wizard, enter all required information and press 'Finish', I always have the same messagebox error:
    "Cannot add the link because the source file '.../relase/setup.msi' cannot be found"
    When I press OK, the installer project is shown, but no setup has been created. If I manualy add the setup and add my addon in the 'Application Folder' section of 'File System', the UI and DI API dependecies are not detected, is it normal is Vs 2005 ?
    Thanks for your help, Francois

    Hi ESAKKI, I read your post and I can now install and uninstall my add-on, thanks !
    However, at the end of the uninstallation. I've got this error:
    "Unhandled exception at 0x774d2108 inmsiexec.exe: 0xC0000005: Access violation reading location 0x00000000"
    I know that is not very helpful, but it's the only info I can give. Anyone know why I have that error or know how haven't it ?
    Thanks, Francois

  • Link button to User Defined Object in Grid

    Hi,
    I'm using SAP B1 8.81 with B1DE.
    I have added a grid which is populated from a DataTable to a form.
    One of the columns in the grid contains the DocEntry of a User Defined Object.
    How can I display a link button on the grid ?
    Regards,
    Ben

    Hello Ben,
    You need to set the column object type.
    Dim oGrid As SAPbouiCOM.Grid = oForm.Items.Item("MyGrid").Specific
    oGrid.Columns.Item("DocEntry").Type = BoGridColumnType.gct_EditText
    Dim oEditCol As SAPbouiCOM.EditTextColumn = oGrid.Columns.Item("DocEntry")
    oEditCol.LinkedObjectType = "2" 'The SDK documentation says you should use the value 0, but in previous versions it didn't work, so I recommend you user a value other than -1 or 0
    You then need to catch the et_MATRIX_LINK_PRESSED event and other your user form...
    From the SDK Help File regarding the BoLinkedObjectType enum
    lf_None -1 No target object
    lf_UserDefinedObject 0 User-defined object
    lf_GLAccounts 1 G/L account object
    lf_BusinessPartner 2 Business Partner object
    lf_Items 4 Item object
    lf_SalesEmployee 53 Sales employee object
    Regards,
    Vítor Vieira

  • How to create folder within folder during compile AddOnInstaller setup disk

    Hi All,
    I tried to create AddOnInstaller using B1DE. When come to Add files portion, I only able to create 1 layer folder to insert my extra file through the wizard. Unfortunately, there are few layer folders in my add on solution such as AddOn\Pic\Icon... etc. Any solution or work around for this issue? Thanks.
    *Platform
    - SAP B1 2005A SP01 PL07
    - VS.Net 2005
    rgds
    ERIC

    Hi Eric,
    The autogenerated project obtained from B1DE installer wizard contains all installation code copying your files into the AddOn folder.
    You can easily edit the AddOnInstallManager class generated inside your project and modify the method "ExtractFilesToAddOnPath" in order to create sulfolders for your files.
    All information you entered in the wizard steps is saved in AddOnInstallInfo class.
    If you make the treatment generic enough you will be able to reuse the same class for several installers.
    If you feel confortable with installers you could modify the wizard project to accept several folders layers. If not by simply modifyint the AddOnInstallManager class everything will work.
    Hope it helps
    Trinidad.

  • B1DE / CFL / Event Handling  ..

    Had problems with CFL's in an application i'm developing so i've created a real simple demo of my problem in the hope someone can help me ..
    In the sample i have a simple screen designed with the painter with a static text field, an edit box and a button . In the .srf  I have defined a CFL with multi selection =  false, object type=2 and a unique ID = 'CFL_1'  and i have attached it to the button via within the .srf .
    I then have a simple before / after event handlers attached to my button to catch the before/after choose from list events 
    When i push the button the before event fires and my little message is displayed (correctly) .  The event returns true (bubbleevent ..) BUT no list appears and no after event is fired .. The routine is trivial but i can't see any reason for the non appearance of my list .. Can anyone shed any light on my problem ?  I'm on SAP2007A PL 15 and using B1DE to generate my initial app (using C#) .. I've tried generating the code inline (creating CFL in code) and attaching it to the button but the result is the same - before event fires and no list ...   If i run one of the SDK examples (ChooseFromLists) which uses this list then it runs without problem ..  I've been on with this for a couple of days now and it's really frustrating ..  I've added the event handlers - but these are essentially the vanilla ones generated by B1DE. Is it anything to do with how B1DE registers the event handlers ?
    public Button__CFL1__btLookup() {
                FormType = "CFL1";
                ItemUID = "btLookup";
            [B1Listener(BoEventTypes.et_CHOOSE_FROM_LIST, true)]
            public virtual bool OnBeforeChooseFromList(ItemEvent pVal) {
                Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                Item item = form.Items.Item("btLookup");
                Button button = ((Button)(item.Specific));
                // ADD YOUR ACTION CODE HERE ...
                B1Connections.theAppl.MessageBox("Choose from list button (before) ", 0, "Ok", null, null);
                return true;
            [B1Listener(BoEventTypes.et_CHOOSE_FROM_LIST, false)]
            public virtual void OnAfterChooseFromList(ItemEvent pVal) {
                bool ActionSuccess = pVal.ActionSuccess;
                Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                Item item = form.Items.Item("btLookup");
                Button button = ((Button)(item.Specific));
                // ADD YOUR ACTION CODE HERE ...
                B1Connections.theAppl.MessageBox("Choose from list button (after) ", 0, "Ok", null, null);
    " Help me Obi Wan  .. you're my only hope  ... "
    Thanks

    Hi Noor , I think i found my problem  .. I created this using the screen painter in PL 7  .. I created a similar screen by hand , saved both and compare XML  .. Screen painter added a 'MODE=0' tag  , manual one created using parameters had 'Mode='1' .. Changed mode on screen painter code to mode='1' and everything worked !  .. Couldn't  see anywhere on screen painter how to explicitly set this keyword , only ones saying -1 represents all modes .. Anyway , thanks again for you interest  and contributions  .

  • B1DE (AddOn Installer) for 64 bit server

    Hi All,
    I have a problem. One of my client has a 64 bit server. AddOn installation created with B1DE for SAP 2007 doesn't work on that server. After running SAP AddOn is trying to install, and then there is an error. Is there any way to create AddOn installation files that work on 64 bit server?
    Regards
    Hmg

    Both Robin and Owen are right... You need to run your code as forced 32 bit.
    The reason is the following:
    - A default project in Visual Studio is compiled as "Any CPU"
       - Any CPU means that you code will be executed as 32bit on a 32bit machine, and 64bit on a 64bit machine.
       - The Any CPU option is great for pure .NET (since all parts of it can run 32bit and 64bit)
       - In case of the SAP SDK and the AddonInstaller.dll, these are COM-based unmanaged code
          - If such unmanage code is not written to work with 64 bit, problems like yours can occur (this happens not only for SAP SDK... Tons of API out there have the same problems)
    - If you change the Any CPU option to the x86 option, you will force 64 bit mashines to run your code in "simulated" 32bit (Don't worry.. it is quite fast and gives no problems)
    We are you this with our 64 bit customers and without any problems...
    Lastly, if you wish to know more about this please hear the following podcast that describes the issue in detail (A good listen): http://www.dotnetrocks.com/default.aspx?showNum=341
    /Rasmus

  • Problem in B1DE Installation

    I have installed B1DE and got the message "Sucessfully Installed" But when i Open VS.net 2003 , B1-Addon Template is not available when i select the New project(Vb.net/ C#). But in Help file says as given below.
    1. Open the Microsoft Visual Studio .NET environment.
    2. Choose New Project.
    3. Select the Visual Basic project type and the SAP B1 AddOnInstaller .NET Wizard template. Show
    4. Enter a name for your installer project and select a location. The installer's .exe file inherits its name from the project.
    Please help me to solve the above Issue?
    i am using SAP B1 2005 B..
    regards
    Suresh

    Another person had a similar problem when having VS.NET installed in another disk than B1DE or B1. Is this your case?
    Re: B1DE & .NET 2003 ( master HDD is D not the standard C)
    Otherwise you can follow the steps in the thread bellow and copy the templates inside VS.NET by hand.
    Regards
    Trinidad.

  • B1DE (2.1) with VS2010 on Windows 7

    Hello all,
    for the benefit of others wanting to run this configuration, it works fine. Here's what I did to make it work:
    - Download B1DE installer and install (I installed "Just for me", selecting VS2008 as VS version)
    - Download B1DE Source Code
    - Run VS as admin, and build B1Wizard.sln (this rebuild takes care of an "Index out of bound" error)
    - Give "Users" access to modify the files in C:\Program Files (x86)\SAP\SAP Business One Development Environment\SAP Business One AddOn Wizard\project templates\ (this allows you to run B1DE as a normal user without elevated privileges)
    As a result, B1DE works like a treat for me, on Windows 7 using Visual Studio 2010 running as normal user.
    Happy developing,
    Joerg.

    Installer created works fine, on both x86 and x64 clients.
    Just had to also give "Modify" permission to the installer template project, in order to create it:
    C:\Program Files (x86)\SAP\SAP Business One Development Environment\SAP Business One AddOnInstaller Wizards\SAP Business One AddOnInstaller .NET Wizard\project templates\VS2008\VB\Installer\AddOnInstallerTemplate.vbproj
    Cheers,
    Joerg.

  • B1DE Professional Installer Problem on win 2008 srv

    Hi all, I found a problem in the B1DE 2.1 Professional Installer, B1 8.8.
    In some machine with win2008 server installed, you need to run B1 as Administrator, and the Setup fails because Custom Actions runs as NT AUTHORITY\SYSTEM instead as the logged user
    So:
    1) SubMain in the Installer project creates the registry Key under HKEY_CURRENT_USER\SOFTWARE\SAP\SAP Manage\SAP Business One\InstallAddOn\MyPartner\MyAddOn key, as the logged user. In this key SubMain stores two path separated by the u201C|u201C  character.
    2) CustomInstallerClass is executed at the end of the setup, try to read the previous written key but as NT AUTHORITY\SYSTEM user, and obviously fails to read because HKEY_CURRENT_USER key is different than HKEY_CURRENT_USER at step 1)
    3) You have an error u201DIndex out of Rangeu201D because the CustomInstallerClass try to split the readed string and to return the second path, but the readed string is an empty string
    I modified the CustomInstallerClass to search other keys (e.g. HKEY_CLASSES_ROOT\TypeLib\{6048236A-956D-498D-A6F1-9C81C13AB6E8}\8.8\0\win32) if the requested key was not found, but this is a dirty solution I donu2019t like much.
    Any other Ideas?
    Regards
    Marco

    Hi Marco,
    Just my two cents worth but I never use the 'Professional' installer due to issues with getting it to install on terminal services. I always use the more primitive project (called 'SAP B1 AddonInstaller .NET Wizard') . The installer screens do look a bit ugly (though with the source code you can of course invest the time to make it look more professional). I've never had issues with this installer as long as I've compiled for a x86 target CPU.
    Kind Regards,
    Owen

  • B1DE setup error

    Hi Friends
    I m using B1DE to create a setup for SAP B1. As per the instuction given in file. I have created. But I am facing the 2 Problems.
    1. To create ARD File there is one batch file. when run it create ARD file for us.
        But it is not creating ARD File. I open that bat file but did not find any information about ARD file (i.e filename having extension .ard). So I proceed for Manual Creation of ARD File). Now the setup is running.
    2.  But In bettween the installation, It flashes the message
    "Exception occured while initilizing the installation
    System.io.filenotfoundexception, could not load file or assembly
    'file:///C:\WINDOWS\system32\Files\SAP\SAP or one of it's dependencies. the system can not find the file specified."
    After that Installation RollBack;
    Need urgent Help......

    Hi Manish
    I think You are not Following right steps..
    Please Be carefull about steps... I am sending u some steps try to this and Check this...
    Fistly Release Your Project.
    1. Create a new Project.
    2. Select VB B1 AddOnInstaller Setup .NET type project
    3. Fill the all Parameters : like application Name,Version,estimated Installation Time=180,estimated UnInstallation Time=180
    4. Checked Restart Needed Check Box.
    5. Add Exe file From Project-> Bin-> Release--> Project.exe
    These are the Priamry Step
    6.Choose Solution Explorer Right Click on SETUP.
    then SETUP->View->File System
    7. Application Folder -> add File --> add Your all file of bin->Release Folder
    8. if u have Crystal Reports then
    add new folder for crystal report then add all file of reports into this folder ...
    Oltherwise no need to follow this step..
    9. Exclude SAPBOBSCOM2005.dll, SAPBOUICOM.exe only.. Note : don't exclude other file..
    10. Choose Solution Explorer > SETUP>ADD--> Project Output -- then Click on OK
    11. SETUP> View> Custom Actions -->
    Right click on custom Action > Add Custom Action> then u will get
    Appliaction Folder Window.. Choose --> Primary Output for CustomerLibrary then OK
    then U will get Priamry Output from CustomerLibrary (Active) in Each Part
    Install--Priamry Output from CustomerLibrary (Active)
    Commit--Priamry Output from CustomerLibrary (Active)
    RollBack--Priamry Output from CustomerLibrary (Active)
    Uninstall--Priamry Output from CustomerLibrary (Active)
    then Choose Commit...
    Right Click On Commit--Priamry Output from CustomerLibrary (Active)
    U will Get Properties window Option and click on this...
    then Go in solution explore -> TODO.txt
    and Paste this  /target="[TARGETDIR]\"  (Note Paste only this.. does not paste path .. it will take auto matically)
    Paste this into Properties window of COMMIT->Custom Action Data
    then Press Enter...
    Click on solution Explorer and Click on SETUP and Press F4...
    then u will get property window ..
    then
    Fill this : Author , Manufacturere,Product Name,Title- Project's title..
    then click on Upgrade code--> new Code
    Right Click on Customer Library-->Project Dependencies --
    Choose your Project --> and then Checked all of the checkd box.. ...
    then Rebuild Your project from Solution Explorer..
    and Click on AddOnREgDataGen File... this file U can Find( Project which you are creating Currently -->
    D:\NewARD\NewARD\NewARD\AddOnRegDataGenFile Like this..
    and picked the ARD from D:\NewARD\NewARD\NewARD\bin  folder....

  • B1DE / Installer ..

    Just migrated my development environment to a new PC and i'm having problems generating an addon intsaller  ..
    I use the wizard in B1DE  with the VB B1 Addon Installer  .. It asks for my project name and then my executable  .. but then aborts with "the template specified cannot be found. Please Check that the full path is correct" .. I've uninstalled and reinstalled the B1DE kit but i'm still having same problem  .. Anyone any ideas ? Which path is it talking about ?
    Thanks !

    Hi Rob,
    Please try looking under the following registry key:
    [HKEY_CURRENT_USER\Software\SAP\SAP Business One Development Environment\SAP Business One AddOnInstaller Wizards]
    Within this you should see subkeys for the installer project paths. If you've installed the B1DE using the path defaults then the two installer paths should be:
    C:\Program Files\SAP\SAP Business One Development Environment\SAP Business One AddOnInstaller Wizards\SAP Business One AddOnInstaller .NET Wizard\
    and
    C:\Program Files\SAP\SAP Business One Development Environment\SAP Business One AddOnInstaller Wizards\SAP Business One AddOnInstaller Setup .NET Wizard\
    Kind Regards,
    Owen

  • B1DE - Help

    Hi in B1DE we having SAPB1 add0n Installerr.NET wizard which we are using to create ard for our Add-ons.
    but am not clear about VB B1 addon wizard and VBB1 add0n Installerr.NET wizard ... whats the purpose of both...
    To create setup for DI Application what we have to use?
    regards,
    Ganesh k

    Hi..
       See this documents...
    B1DE: B1 Development Environment tools
    Applies To:
    SAP Business One
    Article Summary
    This article describes a set of development tools for SAP B1: these tools leverage on the well known and established B1 SDK, on the .NET platform and on Microsoft Visual Studio .NET environment.
    By: SAP B1 Solution Architects
    Title: B1 Development Environment tools
    Creation Date: September, 20 2005
    Last Update: January, 2008
    Table of Content
    B1DE: B1 DEVELOPMENT ENVIRONMENT TOOLS     1
    APPLIES TO:     1
    ARTICLE SUMMARY     1
    TABLE OF CONTENT     1
    INTRODUCTION     3
    B1 CODE GENERATOR WIZARD     3
    B1 SIMPLE INSTALLER WIZARD     3
    B1 PROFESSIONAL INSTALLER WIZARD     3
    B1 UDO FORM GENERATOR     3
    B1 DB BROWSER     3
    B1 EVENT LOGGER     3
    B1 CODE GENERATOR WIZARD     5
    NOTE ON THE CODE     8
    B1 SIMPLE INSTALLER WIZARD     9
    NOTE ON THE CODE     11
    B1 PROFESSIONAL INSTALLER WIZARD     12
    NOTE ON THE CODE     14
    B1 DB BROWSER     15
    NOTE ON THE CODE     16
    B1 UDO FORM GENERATOR     17
    NOTE ON THE CODE     18
    B1 EVENT LOGGER     19
    FILTERING EVENTS     20
    NOTE ON THE CODE     21
    DISCLAIMER & LIABILITY NOTICE     24
    Introduction 
    The SAP Business One SDK provides several programming interfaces to build solutions. In this document we will present a set of software tools, called B1 Development Environment (B1DE) that make easier and quicker to develop and package add-ons based on these interfaces. These are the tools composing B1DE.
    B1 Code Generator Wizard
    This tool is composed of a set of Microsoft Visual Studio .NET wizards and add-ins that generate and update B1 add-ons, creating a complete solution in terms of:
         Source code (C# or VB.NET)
         XML menu and form files
         Microsoft Visual Studio .NET solution, including the references to the B1 type libraries
    The tool leverages on established B1 SDK best practices, on the .NET platform and on Microsoft Visual Studio .NET environment.
    B1 Simple Installer Wizard
    This tool is composed of a Microsoft Visual Studio .NET wizard that generates a solution containing the auto generated source code (VB.NET) already compiled and ready to register your add-on on the SAP Business One application.
    B1 Professional Installer Wizard
    The B1 Professional Installer Wizard generates a Microsoft Visual Studio .NET solution that will help you to create a .NET Setup and Deployment installer for your add-on.
    This wizard uses the Visual Studio .NET Setup and Deployment technology to create a professional looking installer with built-in setup options. This installer is more suitable for experienced .NET developers who are familiar with .NET Setup and Deployment projects.
    B1 UDO Form Generator
    This tool generates an XML form starting from a UDO definition. It can be started from the B1 Code Generator Wizard or directly executed as a Window application.
    B1 DB Browser
    This tool visualizes the current status of a B1 database in terms of the tables currently defined, their columns and properties as name, types, default values and database constraints. It shows also the differences between the current release of B1 and a previous one. It can be started from the B1 Code Generator Wizard or directly executed as a Window application. Note that this tool is also used during solution certification and then it is also included in the B1 Test Environment documentation.
    B1 Event Logger
    Event Logger is a tool that allows you to easily visualize all UI API events fired by the SAP Business One application. You can easily use this tool to analyze the different events fired depending on the user actions and observe the information given by each event; it can be very useful as a first step before specifying which events your add-on needs to manage.
    B1DE setup installs all these tools by default in Program FilesSAPSAP B1 Development Environment and it adds in the Microsoft Visual Studio .NET folders all the configuration files needed to integrate with the development environment itself.
    See MSDN to get information about the integration with Microsoft Visual Studio .NET.
    B1 Code Generator Wizard
    The B1 Code Generator Wizard generates a B1 add-on in form of a Microsoft Visual Studio .NET solution according to the choices of a B1 SDK programmer.
    Once installed, the wizards can be called by Visual Studio .NET with the following steps:
         go under File / New / Project u2026,
         select the project type Visual C# Project (or Visual Basic Project),
         then select u201CC# B1 AddOn Wizardu201D (or u201CVB B1 AddOn Wizardu201D)
         and finally press OK.
    At this point if SAP Business One is running in the same machine a SSO connection will be done to have access to the UI API (menus shown by the wizard will be based in current B1 menus). If no SAP Business One is running a connection window is open (see Figure 13), in this case only a DI API connection will be done and the menus will be fixed (base on a wizard file). Once successfully connected to a B1 company the wizard will present four panes, a first one for the connection and one for every type of B1 objects.
    Connection pane
    The first pane presents three choices for the connection with the B1 SDK. The programmer can select the type of connection needed for the add-on (see Figure 1).
    Figure 1: Connection pane.
    Data Base pane
    The first pane presents a view of the tables and UDO present in a company DB. With mouse clicks the programmer can add tables, fields and UDO (see Figure 2).
    Figure 2: Database pane.
    This is the first pane of the wizard.
    The tree on the left contains all the system and user tables and all user defined objects in the connected company. A right-click context menu is active on the tree enabling:
         To view the definition of a table (activating the B1 Db Browser) and of a UDO
         To add a new user table
         To add a new user field
         To add a new key
         To add a new UDO
    When an item is added a new tab page is added on the tab on the right. It is possible to remove the tab page by right clicking on the tab page itself and selecting Remove. No code generation is done until the Finish button is pressed and then it is possible to undo the choices until the solution is generated.
    Menus pane
    The second pane presents a view of all the system menus present in the B1 desktop. With mouse clicks the programmer can add, update or delete menus, add listeners to menus, or attach forms to them (see Figure 3).
    Figure 3: Menus pane.
    The tree on the left contains all the system menus in B1 application. A right-click context menu is active on the tree enabling:
         To add, delete or update a menu
         To attach a user form to a menu: it is possible to attach an already existing XML form or to generate on the fly a form from a UDO (activating the B1 UDO Form Generator).
         To add a listener to a menu
    When a new operation is selected a new tab page is added on the tab on the right. It is possible to remove the tab page by right clicking on the tab page itself and selecting Remove. No code generation is done until the Finish button is pressed and then it is possible to undo the choices until the solution is generated.
    Forms pane
    The third and final pane presents a view of the forms in the system and all their related items. With mouse clicks the programmer can add listeners to the different events that can be raised by forms and items (Figure 4).
    Figure 4: Forms pane.
    The tree on the left contains B1 forms and their related items grouped by type, plus some form-related information. A right-click context menu is active on the tree enabling:
         To view a form under the Forms node
         To add a listener to a form or to an item
    When a listener is added a new tab page is added on the tab on the right. It is possible to remove the tab page by right clicking on the tab page itself and selecting Remove. No code generation is done until the Finish button is pressed and then it is possible to undo the choices until the solution is generated.
    The programmer can then navigate back and forward across these panes and do and undo all the choices needed in the add-on in terms of tables, UDO, menus, forms and items. When all the choices are done and the Finish button is pressed (and only then), a new Visual Studio .NET C# (VB.NET) is generated.
    It is very important to notice that the code generated by the wizard uses a set of classes that implements B1 SDK best practices. These classes encapsulate safe and performing plumbing logic and then the B1 SDK programmer can concentrate on the functional side of the add-on leaving to them all the integration implementation. In particular:
         All the add-on initialization is handled by the classes B1AddOn and B1AddOnDb. The wizard generates a subclass of B1AddOn that initializes the connections with the desktop and with the company DB and then implements a standard behavior accordingly to what was specified.
         The add-on adds tables and objects to the DB if needed,
         creates, updates and deletes menus
         and then finally waits for events.
         All the event handling involved in a classic B1 add-on is hidden on a set of classes (B1Form, B1Item, B1Menu and B1Listener) and presented in form of a high-level listener-based interface. A listener is here a method marked with a custom attribute (B1Listener): the wizard run-time takes care of all the event registration, routing and filtering. The wizard collects then listeners together in classes representing B1 forms, items and menus leaving then to the programmer to implement the functional part. Figure 14 contains an example of a class generated by the wizard.
    The programmer can still access to all the B1 SDK objects by using the container class B1Connections that has the DI and the UI connections as properties.
    Besides the tool provides also add-ins that makes possible to add new objects or update the existing ones into an existing solution previously generated by the wizard. These add-ins can be accessed by Visual Studio .NET with the following steps:
         go under File / Add New Item u2026
         select u201CC# B1 AddOn Componentu201D (or u201CVB B1 AddOn Componentu201D) to add a menu, form or item
         select u201CC# B1 AddOn Listeneru201D (or u201CVB B1 AddOn Listeneru201D) to add a new listener
    Note on the code
    The code for this tool is contained in the solution B1Wizard. This solution compiles as a class library that is used to run the wizard and generate the solution and also at run-time. The class library is composed of many parts:
         The wizard itself: contains classes like AddOnWizard, AddOnSolution and so on and implements all the integration with the Visual Studio .NET.
         The wizard GUI: contains classes like WizardForm, WizardPage, TabPage and so on and implements all the wizard GUI using Windows Forms.
         The generation engine: contains classes like AddOnGenerator or XmlFormGenerator. It implements all the generation of the source code (using CodeDom .NET namespace) or the form and menu XML files (using directly System.Xml)
         The run-time: contains classes like B1ListenerAttribute, B1AddOn, B1Db, B1Form and so on. It implements all the B1 SDK best practices, including connections, creation of tables, fields and UDO, event registration, routing and filtering and the likes. These classes will be accessed by the solution during its run-time and uses (and hides) all the B1 SDK basic mechanisms.
         The B1 Db Browser tool: contains classes like B1DbTableForm, B1DbBrowser, B1DbTable and so on. It implements the B1 Db Browser tool: the metadata are read by using DI API metadata objects or accessing the DB metadata information directly with an OleDB connection.
    Check MSDN to get more information on the mentioned .NET mechanisms.
    B1 Simple Installer Wizard
    The B1 Simple Installer Wizard generates a Microsoft Visual Studio .NET solution ready to register your add-on on a SAP Business One application.
    Once installed, the wizard can be called by Visual Studio .NET following the steps:
         go under File / New / Project u2026,
         select the project type Visual Basic Project,
         then select u201CVB B1 AddOn Installer .NET Wizardu201D
         and finally press OK.
    At this point a the wizard will present two steps, one to specify general parameters needed for the registration and a second one where to specify the files needed to run the add-on (exe file, DI API and/or UI API references and all the resources files).
    General Information step
    This step will ask for general parameters needed to create the registration file needed to register the add-on on the SAP Business One application prior to the installation. Figure 5 shows this first step.
    Figure 5: AddOn general information.
    The parameters this step will ask are:
         Application Name - Add-on name.
         Version - numeric string indicating your add-on version.
         Estimated Installation Time - estimated time to complete the installation. Valid range: 1 to 3,600 seconds.
    Take into account that installation may take longer on customer machines as they often employ weak or slow machines.
         Estimated Uninstallation Time - estimated time to complete uninstallation. Valid range: 1 to 3,600 seconds.
         Restart needed after installation u2013 the machine needs to be restarted after the installation.
    Add-on files step
    This step will ask for all the files needed by the add-on to correctly run. Figure 6 is showing this second step.
    Figure 6: AddOn basic files.
    Mandatory information to be filled at this step is the executable of the add-on we want to create the installer and the references to the DI API and/or UI API interop dlls used.
    Extra files needed by the add-on to correctly run should be added in extra panes, you can add new panes by clicking on the addfiles button (bottom-right of the window). There can be added as many extra panes as needed, each extra pane containing four files.
    After this two steps done click finish on the wizard window.
    The result of this wizard will consist on the creation of a solution including one Vb.NET project already completed with all needed classes and information entered by the user and compiled. Inside the bin directory of the project will be located the two files needed to register the add-on into the B1 application: The installer executable and the .ard registration file.
    The auto generated project is composed of the following classes:
         Four controls (InstallMain, InstallPath, InstallEnded, Unisntall) that will represent the steps shown to the used during the add-on installation/uninstallation (together with the base classes BaseForm and BaseControl).
         The AddOnInstallInfo class containing the registration and installation information entered by the user.
         The AddOnInstallManager class responsible for the creation of the registration file (.ard) and the complete procedure of the add-on installation following the rules fixed by the SAP Business One add-ons packaging procedure (please have a look to the Package and Deployment section of the SDK help files for more information).
         A directory called AddOnFiles containing all the add-on needed files (entered in the second step of the wizard) as embedded resource.
    Note on the code
    The code of this wizard is contained inside the solution called Installer.NETWizard located inside the B1 DE sources, AddOnInstallerWizards section.
    The main and only project inside the solution is composed of three parts:
         The wizard itself: contains classes like AddOnInstallerWizard, AddOnInstallerSolution and implements all the integration with the Visual Studio .NET.
         The wizard GUI: contains classes like WizardForm, WizardPage, TabPage and implements the entire wizard GUI using Windows Forms.
         The generation engine: contains classes like AddOnInstallerGenerator. It implements all the generation of the source code (using CodeDom .NET namespace).
    B1 Professional Installer Wizard
    The B1 Professional Installer Wizard generates a Microsoft Visual Studio .NET solution that will help you to create a .NET Setup and Deployment installer.
    Once installed, the wizard can be called by Visual Studio .NET following the steps:
         go under File / New / Project u2026,
         select the project type Visual Basic Project,
         then select u201CVB B1 AddOn Installer Setup .NETu201D
         and finally press OK.
    At this point the wizard will present two steps: one to specify general parameters needed for the registration and a second one where to specify the exe file of the add-on.
    General Information step
    This step will ask for general parameters needed to create the registration file needed to register the add-on on the SAP Business One application prior to the installation. Figure 7 shows this first step.
    Figure 7: AddOn general information.
    The parameters this step will ask are:
         Application Name - Add-on name.
         Version - numeric string indicating your add-on version.
         Estimated Installation Time - estimated time to complete the installation. Valid range: 1 to 3,600 seconds.
    Take into account that installation may take longer on customer machines as they often employ weak or slow machines.
         Estimated Uninstallation Time - estimated time to complete uninstallation. Valid range: 1 to 3,600 seconds.
         Restart needed after installation u2013 the machine needs to be restarted after the installation.
    Add-on exe file step
    This step will ask for the add-on exe file. Figure 8 is showing this second step.
    Figure 8: AddOn exe file.
    After this two steps done click finish on the wizard window.
    The result of this wizard will consist on the creation of a solution including three Vb.NET projects.
         A main project Vb.NET with the same name as the solution. This project generates the installer executable file used to register the add-on into the SAP Business One application.
         A project called Setup of type .NET Setup and Deployment project.
         A project called CustomerLibrary of type library. This project is responsible for the communication between the installer and the SAP Business One application. The Setup project calls this project at different stages of the installation
    After the wizard generates the solution the user has to complete and configure the Setup project as usual for a .NET Setup and Deployment. The instructions to follow are clearly described in the TODO.txt file included on the main project. After following these steps the exe file of the main project will be the installer of the add-on to be used for the add-on registration on the SAP Business One application. The .ard file will be auto generated by the wizard and located inside the bin directory of the main project.
    Note on the code
    The code of this wizard is contained inside the solution called InstallerSetup.NETWizard located inside the B1 DE sources, AddOnInstallerWizards section.
    The main and only project inside the solution is composed of three parts:
         The wizard itself: contains classes like AddOnInstallerWizard, AddOnInstallerSolution and implements all the integration with the Visual Studio .NET.
         The wizard GUI: contains classes like WizardForm, WizardPage * and implements the entire wizard GUI using Windows Forms.
         The generation engine: contains classes like AddOnInstallerGenerator. It implements all the generation of the source code (using CodeDom .NET namespace).
    B1 DB Browser
    B1 DB Browser is able to browse the current status of a B1 database in terms of metadata and present a synthetic and navigable view of the table in the database. Figure 9 shows a table definition as presented by this tool.
    Figure 9: B1 DB Browser main window.
    The tool merges together information taken using B1 SDK metadata functions and .NET database services and presents them in a grid.
    A tree view in the left side presents 5 main nodes:
         Advanced DB Objects: Extended stored procedures, Inlined table-functions, Replication filter stored procedures, Scalar functions, Stored procedures, Triggers and Views.
         B1 Tables: All B1 system tables
         UDFs: User Defined Fields grouped by table name.
         UDOs: User Defined Objects
         UDTs: User Defined Tables
    Each table node in the tree view includes the list of fields, user defined fields, keys and related tables inside it.
    Per each main node/sub node the relating information is presented in a grid. The columns on the grid depend on the type of object to be shown.
    Per each table the grid shows the list of its fields with the following information per each field:  
         The name of the field
         The description of the field
         The type of the field
         The linked table to the field, if any
         The length of this name
         Whether the field is nullable
         The default values associated to the field, if any
    Starting on 2005 SP01 version a tool bar button offers the possibility to visualize the DbChanges list regarding the precedent version: New, Modified, Deleted Tables & Fields & Keys.
    Note on the code
    The code for the Db Browser has B1DbBrowserTool class as main class.
    This class is contained in the solution B1Wizard and uses:
         DI API metadata objects to access the UDO and tables information
    B1 UDO Form Generator
    The B1 UDO Form Generator generates a B1 XML form starting from a UDO definition in a B1 DB. The tool can be executed directly or called when attaching a form to a menu.
    The tool just scans the definition of a UDO in terms of fields and children tables. Based on this information it creates then a B1 XML form, adds items to the form according to a simple layout and binds them to the corresponding fields and tables. These are the basic rules followed by the tools when generating the form.
    Items
    Every field in the main table has a corresponding item in the form to which it is bound:
         if a field has default Yes/No values it adds a check box to the form,
         otherwise if a field has a set of default values it adds a combo box to the form,
         otherwise it adds a text field.
    Child table
    Child tables are added in form of matrixes in different folders. Columns are added to the matrix in relation with the fields in the child tables following the same rules as above.
    Data binding
    The form is then bound to the UDO itself ensuring all the data handling as creation, deletion and update. Navigation is ensured based on the key of the master table either in case of MasterData and Document object type.
    Figure 10 contains a form generated by this tool.
    Figure 10: B1 UDO Form Generator.
    Note on the code
    The code for the form generator is contained in the class XmlFormGenerator.
    This class is contained in the solution B1Wizard and uses:
         DI API metadata objects to access the UDO and tables information
         System.Xml .NET namespace to create the XML form
    B1 Event Logger
    The Event Logger tool listens for all events fired by the UI API interface and shows one line per each event in a .Net Grid. The information shown per each event depends on the event type. Per all events the same columns are shown, the information will be relevant or not depending on the event type.
    Figure 11 shows the main B1 Event Logger window.
    Figure 11: Main window of the B1 Event Logger.
    The information shown per each event is:
         EventType
    Returns a value indicating the type of the handled event.
         BeforeAction
    Returns a boolean value specifying whether or not the application sent the event's before notification.
         Success
    When ItemEvent.BeforeAction = False, returns a boolean value specifying whether or not the application handled the event successfully.
         FormType
    Returns a string specifying the type of the form getting the event (FormTypeEx).
         FormCount
    Returns the form number within the type.
         ItemUID
    Returns the item ID number for item events. 
         ColUID
    Returns the column ID for matrix items only.
         Row
    Returns the item row for matrix items only.
         FormUID
    Returns the unique ID of the form in which the event occurred.
         FormMode
    Returns the form mode in the SAP Business One application.
         CharPressed
    Returns the character that was pressed in the ItemEvent event.
         InnerEvent
    Returns a boolean specifying whether or not this event is internal.
         ItemChanged
    Returns a value specifying if an item was changed by the SAP Business One engines during the event process (is valid only when the Before_Action property is set to Off).
         Modifiers
    Returns a value specifying the pressed key in a et_KEY_DOWN event.
         PopUpIndicator
    Returns the row in a popup list when handling popup event.
    If you want to obtain more information regarding events in the UI API please have a look to the DI API Help File, section u201CHow to -> Handle Eventsu201D.
    Filtering Events
    You can add a filter to the Event Logger to show only the events you are interested in per form.
    Just press the Filter button in the tool bar and a new window appears giving you the possibility to choose per each form the events you want to see (cf. Figure 12).
    Figure 12: Filters management window.
    If you want to remove the current filter and receive all events you only have to press the button u201CNO Filteru201D in the Filters Management window.
    If you need to remove the list to create a complete new filter you can use the right button click menu and choose Delete All. You can also delete only a specific event from the filter by selecting it and choosing Delete Current Line.
    Note on the code
    The code of the Event Logger project is located in a separate solution inside the B1DE Source Code. It is a very simple project reproducing a simple add-on logging all events fired by B1 application.
    Figure 13: B1 Wizard DI API Connection parameters window.
    Connection form: insert the DB username and password and click on GetCompanyList button. CompanyDB combo-box will be filled with all the companies present on this database, select one, fill into username and password and press Connect. If needed, AddOnIdentifier can be typed too.
    public class Form__134 : B1Form {
    public Form__134() {
    FormType = "134";
    B1Listener(BoEventTypes.et_FORM_LOAD, false)
    public virtual bool OnFormLoad(ItemEvent pVal) {
    Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
    // ADD YOUR ACTION CODE HERE ...
    return true;
    B1Listener(BoEventTypes.et_FORM_UNLOAD, true)
    public virtual bool OnBeforeFormUnload(ItemEvent pVal) {
    Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
    // ADD YOUR ACTION CODE HERE ...
    return true;
    Figure 14: Sample of code generated by the B1 Code Generator Wizard.
    This code represents the system form of type 134 (Business Partner Master Data) to which have been attached two listeners:
         The first listener is OnFormLoad and is called when the form is loaded. A B1 SDK programmer can add some logic into this method and decide whether the system processing should continue or not by returning true or false.
         The second listener is OnBeforeFormUnload and is called before the form is unloaded. A B1 SDK programmer can add some logic into this method and decide whether the system processing should continue or not by returning true or false.
    The attribute B1Listener marks these methods as callbacks for B1 UI events.
    Disclaimer & Liability Notice
    This document may discuss sample coding, which does not include official interfaces and therefore is not supported. Changes made based on this information are not supported and can be overwritten during an upgrade.
    SAP will not be held liable for any damages caused by using or misusing of the code and methods suggested here, and anyone using these methods, is doing it under his/her own responsibility.
    SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of the technical article, including any liability resulting from incompatibility between the content of the technical article and the materials and services offered by SAP. You agree that you will not hold SAP responsible or liable with respect to the content of the Technical Article or seek to do so.
    Copyright © 2004 SAP AG, Inc. All Rights Reserved. SAP, mySAP, mySAP.com, xApps, xApp, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product, service names, trademarks and registered trademarks mentioned are the trademarks of their respective owners.     
    Regards...
    Billa 2007

  • Regarding B1DE

    Dear All,
         After Installation of B1DE we can create our AddOn from VB.Net Project ,by cicking on new project we get(SAP B1 AddonInstaller .Net Wizard). But once we Unistall  B1DE. We Cann't get that wizard and cannot create the addon.
    What is the solution to get that wizard.
    Thanks .
    Bodhisatya

    Thanks for your reply.
    but still i insist in knowing the solution, if you have any ?
    due to some virus problem i had to uninstall B1DE along VS2005 and some other packages.
    it will be very helpfull, if anybody can throw some light in the matter in a detailed manner, so that my problem is solved.
    Thanking in Anticipation.

  • Error while defining a warehouse as Bonded Store

    Hi All
    I am getting one error while defining a OPM Warehouse as Bonded Store in OPM Inventory Module under Warehouse Attributes.
    The error is 'APP-JA-460778: This Warehouse does not have a Parent Organization defined in Oracle Financials'. Can any one tell me where i missed the setup part of defining a parent organization in Financial Module. We are on OPM 11i EBS.
    Thanks in advance
    Prem.

    I think you are using India Localization. Sorry, I don't have any knowledge in that area.
    I got following information about how to setup Organization/Warehouse. And it says that any deviation from this may result in error. Check if you are following all the steps required for defining warehouse and organization.
    Please ensure that the following setups are done exactly as mentioned below:
    1) Create an OPM organization in OPM System Administration using OPM Organization Screen eg. ‘PM1’
    2) Create a Location using ‘HR Locations’ form with the same name as the OPM Organization (eg. PM1)
    3) Create an Inventory Organization using the form ‘HR Organizations’ with the same Organization Code as the OPM organization Code created in step 1. (Additional Identification details of the Organization could be given after a colon (:) in the Organization Name – Eg. ‘PM1: Vision Process India Mumbai’). Make this Inventory Organization as ‘Process Enabled’ and in the ‘Process Organization’ field, refer to the OPM Organization. Attach the HR Location created in step 2 to this Inventory Organization.
    4) On saving the Inventory Organization record, the system shall automatically create a Warehouse with the same name in OPM under the OPM organization. (eg.PM1)
    5) Query the Location ‘PM1’ and attach the Inventory Organization ‘PM1’ to it.
    6) Go to Organization Additional info in OPM System Admin – Create a record for ‘PM1’.
    Enter the EC Code for this Organization, as this is the Excise Licensed Organization. After saving
    the record here, an automatic entry is created in India Local Inventory – Organization Additional Information for the Inventory Organization.
    7) Go to India Local Inventory Org Additional Info and query for this Organization (it will be visible without location). DO NOT mark this as Master Organization.
    8) Add another record for the Organization with Location (eg. PM1)
    9) Check the 'Master Org' flag for this combination of Organization and Location.
    B: Warehouse :
    1) Create an Inventory Organization in India Local Inventory corresponding to the Warehouse in OPM (eg. ‘WSH’). Make this as ‘Process Enabled’ and give the ‘Process Organization’ as the
    OPM Organization created earlier (PM1), which is the Process Organization this Warehouse is going to report to.
    2) Create location (WSH-With the same name as the Warehouse Code) in India Local Inventory and attach it to organization ‘WSH’ in India Local Inventory
    3) System automatically creates Warehouse ‘WSH’ in OPM under the OPM organization (PM1)
    4) Using the ‘Warehouse Attributes’ form, classify this Warehouse as Bonded/Trading/OSP
    5) Go to India Local Inventory Organization Additional Information form and create a record ‘WSH’ giving the Master Organization as ‘PM1’ (actually this is referring to the combination of PM1 with Location
    PM1 as Master Organization) . Add another record for the same Org ‘WSH’ with Location ‘WSH’
    with Master Organization as ‘PM1’. Please ensure that the EC Code is exactly same as the Master Organization.
    6) Optionally ensure that in the Register Priorities, highest priority (1) is set against PLA.
    7) Optionally ensure that Allow Negative PLA Balance Flag is checked.
    Also make sure that all objects (triggers, packages etc) that are related to localization are valid.

Maybe you are looking for

  • Price condition - all items

    Hi gurus, I have a little problem from a client. For example : i have 3 items   item A     gross weight 2kgrs   item B     gross weight 1,5kgrs   item C     gross weight 3kgrs there is SD order with above items as follows:   item A  2 pcs  (gross wei

  • Biller Direct and CRM billing

    Dear Experts, Could anyone kindly help to tell me how to deploy Biller Direct? If my company has the license of FSCM, does it mean Biller Direct has  been deployed already? Also, I want to make fully use of CRM billing function. I have seen a demo of

  • Upgrading Macbook Pro 10.4.11 os x...

    Hi there! I have a few questions about upgrading my operating system. My system is as follows: 10.4.11 Tiger, Processor (2.2 GHz Intel Core 2 Duo), Memory (2 GB) I have a copy of 10.5 Leopard, as well as the one that follows, but I am worried if inst

  • My music is no longer "found" after home sharing

    I recently got a Macbook Pro 15" Retina display computer. I previously had a Dell Inspiron. When I went to transfer my iTunes (which was a pain in the first place) I ultimately used home sharing to transfer all of my music. It's been fine for about a

  • Where Can I Download Offline Help Files for Creative Cloud?

    The heading says it all. I am not always connected to the internet and, in any event, I find the on-line help annoying and tedious. I can only find PDF help files for CS4, where can I get them for CS6?