B1DE Addon Wizard

Hi,
I am trying to create UDO form from B1 Addon wizard. I could create UDO forms for Document object.While running that Addon code, i can add, find objects in that form. After that i tried to change edit box to combo through Screen paiter.When i try to run the same form once again, it doent provide any functionality like add, find or add new line in that form.
How would I add combo box in UDO?I am using B1DE 2004.
thanks and regards
BBN

Hi Nick,
i changed edit field to combo box, renamed that UDO xml form to srf file then changed its type. When i try to run that UDO form, it shows all the fields, but not standard UDO form functionality.How would i bind datasource to that UDO form field. i tried to bind with one field in that table. But it gives bad datasource error.
regards
BBN

Similar Messages

  • "No record found" create by VB B1 AddOn Wizard

    Hi
       I using the VB B1 AddOn Wizard of B1DE by VB.NET 2003.  But It show the "No record found", when fill-out the connect information.  I not sure what's problem.  I installed the B1DE version as "SAP Business One Development Environment Setup for SAP Business One SDK 2005 SP01 v1.2"
    Please advise.
    Many Thanks.

    Hello Winson,
    This is a known issue. Please create an UDO in your database, and then B1DE will work.
    Thanks,
    Nick

  • How to identify listeners types for forms, items and events in addon wizard

    Dear users,
    I have developed a sample addon through B1DE wizards and successfully installed and connected the addon and can view menu and form of my addon. Since i am new to this, i didn't add any listeners to my form, items and events because i don't know what type of listeners to add and what coding to add after adding listeners.
    If anyone describe me how to work with listeners, i would be glad. My form has basic fields like BPcode, BPname, Docnum, Itemcode, Item name, quanity, price, total etc. Uptil now my addon form has no function of getting list of BP and Items and calculating the totals based on price and quantity but it has some basic functions like add, update,del, add print view, next record previous, record next etc. which are due to object registration and auto-code generation wizards i think.
    Please help me in adding listeners and their relevant coding.
    Thanks in advance.

    Thanks for reply, Actually I am asking about listeners in the wizard of B1DE, code generator wizard. I think you are telling me about adding listeners directly in the vb.net. Kindly, tell me first, what event type I should add for item, form etc while adding listeners during  the wizard. Or If you know some link where event types of listeners are decribed, you are more than welcome.
    Thanks,
    Farhan

  • 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

  • How to create unistaller through B1DE installer wizard

    Dear User,
    I have developed an add-on through B1DE code generator wizard and installer wizard, it successfully installs in SAP business one but when i want to uninstall it, i have to remove it manually by deleting *.sbo files and deleting it from SARI table and also from business one add-on folder. Is there any way to automatically create its uninstaller through wizard? like i created installer through installer wizard.
    Any help is appreciated,
    Thanks,
    Farhan

    Thanks Trinidad,
    Problem is almost solved but just to confirm one thing so that i can mark this post as "Solved problem"
    In the ard file generation window (found in SAP business one sdk tools > AddOnRegDataGen.exe), i want to confirm the parameter for install and uninstall. the command line argument for install is /z and for uninstall is /x ? am i right??
    Your reply is ver much appreciated.
    Thanks n regards,
    Farhan

  • Slow Button

    Hi I've just started experimenting with manipulating system forms. I've managed to add buttons to the Item Master Data form and they work perfectly.
    The problem occurs when I add a button to the area which contains user defined fields. (pVal.FormType == -150). The button is much slower than normal. It takes a while to press. The form also seems to flicker a bit when this button is pressed.
    Can anyone help me?

    From what you wrote it looks like that your addon is receiving plenty of
    et_ACTIVATE and et_DEACTIVATE events from 2 forms. One thing you can
    try is to filter out these events - if you don't need them.
    If you use B1DE AddOn wizard then all the events you don't use are automatically
    filtered. You can get B1DE from SDN under Business One SDK Tools.
    If you decide to use SDK natively then you can get information on how to
    filter useless events on the SDK help files (check out the class EventFilters in
    the UI section) or on the e-learning section.

  • Can't connect to company using B1DE

    Hi
    I have just installed B1DE for SAP 2005 SP1.
    The problem I have is that when I run the addon wizard and the connection screen comes up, I get an error - 'connection to database failed - connection to sbo-common has failed '
    I get this with the sdk if I don't have a valid period set up. The periods are set fine.
    Can anyone suggest anything please ?
    Thanks
    Regards Andy

    Hi,
    Can you please take a simple addon and replace the DI connection by the following code?
    You only have to replace all strings with the corresponding datas you want to use:
    diCompany.Server = "localhost";
    diCompany.CompanyDB = "YourCompany";
    diCompany.UserName = "manager";
    diCompany.Password = "manager";
    diCompany.DbUserName = "dbusername";
    diCompany.DbPassword = "dbpassword";
    int ret = diCompany.Connect();
    if (ret != 0)
            int errcode;
            string errmsg;
            Globals.diCompany.GetLastError(out errcode,out errmsg);
            Cursor.Current = Cursors.Default;
            MessageBox.Show("ERROR - Connection to company failed: " + errmsg);
    Please let me know if it works or not
    Regards
    Trinidad.

  • How to make my addon appear on the menuitem list on sap b1 startup?

    Hi,
    I developed a sample "ui addon" that is supposed to create a new menuitem and display a form when clicked.
    I was able to install it using the b1de installation wizard and everything appears to be working...
    The problem:
    After installing the addon, the only way for it to start is to set the "Default Group", in the "Add-on Admnistration window", to "manual" and than go to the "Add-on Manager" select it from the list and hit "Start" to make it run. The problem is that i have to do this everytime i want the addon to run and what i wanted to know is how to make it start automatically everytime i start sap b1.
    I already tried setting the default group to automatic, but sap changes it to manual in the Add-on Manager. Am i doing something wrong?
    Thank you for your time,
    Patricia

    HI Patricia,
    The the user settings, and set the at the user settings to automatic.
    The best way is mandatory, if you have any required functionality inside. (this can be set at ard file generation using the Mandatory check box).
    Regards,
    J.

  • 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 2.1: Der Index war außerhalb des Arraybereichs.

    Hallo,
    ich habe vor mit den B1DE 2.1 (SAP Business One Development Environment Tools) in VS2005 zu arbeiten.
    Das Problem ist das Visual Studio 2005 mir die Fehlermeldung
    Der Index war außerhalb des Arraybereichs.
    liefert sobald ich ein Projekt mit dem VB B1 AddOn Wizard erstellen möchte. Nach dem bestätigen der Fehlermeldung stürzt VS2005 komplett ab.
    Ablauf in VS2005:
    - Neues Projekt...
    - Vorlagen = VB B1 AddOn Wizard
    - Mit OK bestätigen
    - AddOn Wizard startet und listet mir auf, welche Punkte zum Erstellen durchgelaufen werden.
    - Nach Bestätigung der Auflistung kommt die Fehlermeldung
    Auch eine Neuinstallation von B1DE brachte keinen Erfolg.
    Mein System:
    Windows 7 Professional 32 bit
    Visual Studio 2005 Professional
    MSSQL 2008 R2
    SAP Business One 8.8 mit PL 17

    Hallo,
    habe die Lösung.
    1. SourceCode von B1DE herunterladen
    2. Setup neu erstellen
    3. Installieren
    Und schon funktioniert VB B1 AddOn Wizard.

  • Problem with B1DE 2.0 on Vista with VS2008

    I just installed B1DE 2.0.  I use Visual Studio 2008 on Vista.
    When creating a B1 addon project I get an error.  I describe the steps I perform:
    I choose File > New > Project
    I choose Visual Basic > VB B1 AddOn Wizard
    I get an error: "Connection error: Connection - Could not find SBO that match the connection string".
    However, when clicking ok, I can specify the connection settings.  So, I assume the error box message is no problem.
    After I click "connect", I choose for SSO and I just click Next to go to the following screen.
    When I click "finish" on the last screen, I get the following error: "Access to the path 'C:\Program Files\SAP\SAP Business One Development Environment\SAP Business One AddOn Wizard\project templates\VS2008\VBAddOnTemplate.vbproj' is denied".
    In the statusbar of VS2008 you can read: "Creating project 'ProjectName'... project creation failed"
    What should I do to make an add-on for SAP B1 2007 in VS2008?

    >
    Yatsea Li wrote:
    > When I click "finish" on the last screen, I get the following error: "Access to the path 'C:\Program Files\SAP\SAP Business One Development Environment\SAP Business One AddOn Wizard\project templates\VS2008\VBAddOnTemplate.vbproj' is denied".
    >
    > -- the problem is the strict permission setting in vista, you may runas admin to open the VS2008 and create the addon again.
    When I run VS2008 as admin, and I click "VB B1 AddOn Wizard" and then on "OK" to create a new AddOn project, the statusbar simply just shows "Creating project ProjectName... project creation failed ".
    Then I realized that B1DE was installed as "just for me" instead of "everyone".  Now, problem is solved by running VS2008 as admin and installing B1DE for everyone.  Thanks for your help.

  • B1DE usage help file

    hi every one,
                     Can any tell me VB-B1 addon wizard detailed usage help file
                      SAP-B1 addon installer.net wizard detailed usage help file
                      VB-B1 addon istaller setup.net detailed usage help file

    Varma,
    Apologies ... I am not sure what you are asking.  When you install the Business One Development Environment, you get Help File, Documentation and Class Reference Help File icons added to the B1DE Program Group as well as there is a "B1DE.doc" Word document placed in ...
    ..\Program Files\SAP\SAP Business One Development Environment
    This is all of the information on B1DE.
    Eddy

  • B1DE Configuration

    Hi Everyone,
            Please help in B1De Configuration: I use Visual Studio 2008 PE and B1DE for VS2005 and VS2008. When I start  VB B1 AddOn Wizard, I got this error message
    Index was outside the bounds of the array
             How can I run B1DE? help me!
    thanks in advance!
    Best Wishes,
    thlaing

    Hi
    Download it from this link
    http://www.mediafire.com/?2g4cw9aga9d9xz2
    http://www.4shared.com/file/ttelZMzM/B1DE_FrameWRK_35.html
    Regards
    Arun

  • 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

  • AddOn Connection timeout

    Hi All,
    I m getting Addon Connection timeout error when connecting addon which is created with crystal reports.
    I am using single-sign on for connection to company, and using B1DE Addon installer to generate .ard and .exe file.
    (does firewall have any part in this? I am able to connect the addon made out of some UI API-DI API sample supplied with SDK.besides, the client has enough of RAM. the exe runs fine in debug mode.)
    thanks and regards,
    Binita Joshi
    Edited by: Binita  Joshi on Apr 29, 2008 1:53 PM
    also,while creating the addon,  I have given the maximum allowed installation and uninstallation time.

    Binita,
    the only time i had this issue "when the addon starting failed but it is anyway running" i passed the
    wrong string. use this c# sample to control your code.
        private void SetApplication() {
            //  Use an SboGuiApi object to establish connection
            //  with the SAP Business One application and return an
            //  initialized appliction object
            SAPbouiCOM.SboGuiApi SboGuiApi = null;
            string sConnectionString = null;
            SboGuiApi = new SAPbouiCOM.SboGuiApi();
            //  by following the steps specified above, the following
            //  statment should be suficient for either development or run mode
            try
                sConnectionString = System.Convert.ToString(Environment.GetCommandLineArgs().GetValue(1));
            catch
                System.Windows.Forms.MessageBox.Show("AddOn must start in SAP Business One");
                globals.AppendTextToFile("B1C_AddOn.log", "#" + Convert.ToString(DateTime.Now) + "# ERROR: AddOn must start in SAP Business One");
                System.Environment.Exit(0);
            //  connect to a running SBO Application       
            try
                // If there's no active application the connection will fail
                SboGuiApi.Connect(sConnectionString);
            catch
            { //  Connection failed
                System.Windows.Forms.MessageBox.Show("No SAP Business One Application was found");
                globals.AppendTextToFile("B1C_AddOn.log", "#" + Convert.ToString(DateTime.Now) + "# ERROR: No SAP Business One Application was found");
                System.Environment.Exit(0);
            //  get an initialized application object
            globals.SBO_Application = SboGuiApi.GetApplication(-1);
    much luck
    David

Maybe you are looking for