AddOn Development

Hi Eddy,
I have a doubt in Creating Form using UDO. iam creating 2 form one is parent and another form is for child.Parent form is bounded to parent table and child form is bounded to child table.Both form contains the same Object type 'OCAT'
Problem :
1)I have created 2 Tables in the object Type Master Data and Master Data Rows.
2)For the parent table,i added 1 column as Category.
3)Then i added CatInfo Field for the Child table.
4)Then i registered the above in UDO with the object Type "OCAT"
5)Then i designed a form in screen painter by setting the object type as "OISP".
6)Here i added 2 Edit Text one for Code and another for Category.
7)Then i added a button for opening a Child form for entering the Category info.
8)In the another form(Child Form),i added a matrix with CatInfo Column.
9)Then i added two button with uniqueID 1 and 2.
Public Class CategoryClass
   Inherits GeneralLib.B1Form
#Region "Variable Declaration"
   Private oCode, oCategory As SAPbouiCOM.EditText
   Private StrCurFormID As String
#End Region
   Public Sub New()
       MyBase.New("Category.srf")
       StrCurFormID = SBO_Application.Forms.ActiveForm.UniqueID
       Form.DataSources.DBDataSources.Item("@OCAT")
       InitializeFormComponent()
       Form.DataBrowser.BrowseBy = "CatTxt"
       If Form.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
           Form.Items.Item("CodeTxt").Enabled = True
       End If
   End Sub
   Private Sub InitializeFormComponent()
       Try
           oCode = Form.Items.Item("CodeTxt").Specific
           oCode.DataBind.SetBound(True, "@OCAT", "Code")
           oCategory = Form.Items.Item("CatTxt").Specific
           oCategory.DataBind.SetBound(True, "@OCAT", "U_Category")
           oCategory.Active = True
       Catch ex As Exception
           Throw ex
       End Try
   End Sub
   Private Sub CategoryClass_AddMenuClick(ByVal MenuID As String, ByVal FormID As String) Handles Me.AddMenuClick
       Try
           If MenuID = "1282" And FormID = StrCurFormID Then
               If Form.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                   Form.Items.Item("CodeTxt").Enabled = False
                   oCode.Value = GenerateSerialNo("OCAT")
               End If
           End If
       Catch ex As Exception
           SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, True)
       End Try
   End Sub
   Private Sub CategoryClass_ItemPressed(ByVal ControlName As String, ByVal ColumnUID As String) Handles Me.ItemPressed
       Dim ChildClass As ChildClass
       Try
           If ControlName = "1" Then
               If Form.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                   Form.Items.Item("CodeTxt").Enabled = False
                   oCode.Value = GenerateSerialNo("OCAT")
               End If
           End If
           If ControlName = "LinkBtn" Then
               ChildClass = New ChildClass()
           End If
       Catch ex As Exception
           SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, True)
       End Try
   End Sub
End Class
Child Form :
Public Class ChildClass
   Inherits GeneralLib.B1Form
   Private StrCurFormID As String
   Private oMatrix As SAPbouiCOM.Matrix
   Private oColumns As SAPbouiCOM.Columns
   Private ocolumn As SAPbouiCOM.Column
   Private oCode As SAPbouiCOM.EditText
   Public Sub New()
       MyBase.New("Child.srf")
       StrCurFormID = SBO_Application.Forms.ActiveForm.UniqueID
       Form.DataSources.DBDataSources.Item("@OCAT")
       InitializeFormComponent()
       'oMatrix.AddRow(1, oMatrix.RowCount)
   End Sub
   Private Sub InitializeFormComponent()
       Try
           oMatrix = Form.Items.Item("ChildMat").Specific
           oColumns = oMatrix.Columns
           ocolumn = oColumns.Item("Code")
           ocolumn.DataBind.SetBound(True, "@CAT1", "Code")
           ocolumn = oColumns.Item("catInfo")
           ocolumn.DataBind.SetBound(True, "@CAT1", "U_CatInfo")
       Catch ex As Exception
           Throw ex
       End Try
   End Sub
   Private Sub ChildClass_AddMenuClick(ByVal MenuID As String, ByVal FormID As String) Handles Me.AddMenuClick
       Try
           If MenuID = "1282" Then
               If Form.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                   oMatrix.AddRow(1)
                   oCode = oMatrix.Columns.Item("Code").Cells.Item(oMatrix.RowCount).Specific
                   oCode.Value = GenerateSerialNo("CAT1")
                   'Form.Items.Item("CodeTxt").Enabled = False
                   ''GenerateSerialNo("CAT1")
               End If
           End If
       Catch ex As Exception
           SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, True)
       End Try
   End Sub
End Class
Will you please provide me some solutions on the same.
Regards
Mohana.

Hi Vasu,
It is not solved.Still Iam having some doubt.If Iam using two forms (Parent and Child form) without registering in UDO means then how to transfer my data from child form to the parent form.
i.e.If I added some data in child form and clicked update,i want to store the data temporarily.After that all the operations completed in parent form and clicked add/Update it should save both the parent details and the child details.For that reason i have to transfer the data from child to parent while clicking add in parent form.
How should i achieve this.
Regards
Mohana

Similar Messages

  • AddOn\Development that imitates B1 approval procedure.

    Hello
    AddOn\Development that imitates B1 approval procedure.
    Our customer needs to use the approval procedure B1 core behavior provides. However, he also needs the possibility to update lined at documents that were processed through the approval process.
    Is anyone familiar with such development\Addon?
    Thanks in advance
    Revital

    Hi Revital,
    I apologize. You are correct. Using the approval procedure, you can only change the values of SOME header fields, and not the row fields. I'm sorry to have mislead you.
    Regards,
    Vítor Vieira

  • I would like to start Mobile Addon Development

    Hi Experts
    I would like to start Mobile Addon Development. But i don't know from where to start. is there any documentation available for mobile development?
    Please help and suggest me.
    - Regards
    Vikas

    Hi Vikas,
    check this link SAP Mobile Academy - Home
    Regards,
    Ibrahim

  • 64-bit server, 32-bit client: Addon Development

    Hello,
    First time posting so bear with me
    Given how Business One handles distributing addon installations between the client and the server, what is the recommended strategy for running 32-bit client versions of Business One while the server operates under 64-bit?
    We have compiled 64-bit versions of the addon for the server, but it attempts to distribute them to the client, and visa versa, thus throwing errors.  Any tips would be greatly appreciated.
    Thanks!
    Chris

    Hello again,
    Just thought I'd bump this topic.  We're still working on this issue and any experience you all have had with it is greatly appreciated.
    Thank you

  • Our Addon developed Data Interface fails connect to server

    Hello everyone,
    after the instruction:
        lRetCode = oCompany.Connect
        '// Check for errors
        If lRetCode <> 0 Then
            oCompany.GetLastError lErrCode, sErrMsg
            MsgBox "error code:" & lErrCode & "- error message:" & sErrMsg
    we have following message
    error code:126- error message: - Impossibile trovare il modulo specificato.
    English (Impossible to find specified module)
    The addons has always connected correctly until 30/12/2005.

    Had exactly same problem/error when lRetCode = oCompany.Connect was executed.  Problem is that I was messing up with my registry using msizap.  Could not install software so used Msizap.exe which is a microsoft windows utility that "kills" any pending Windows Installer Installations.  This messed up SAP Business One Setup and had to remove and re-install.  Everything is working just fine now.  There is probably a setting in the registry but neither have the time nor the will to follow this through, as long as problem is solved.
    Hope this works for you.

  • How to use Websocket for Firefox for Mobile Android Addon

    I am trying to write a simple firefox mobile addon that talks with my server side code using Websocket.
    I have my code working for Desktop Firefox Addon but I am having difficulty with one for Firefox mobile.
    function connectToServer(aWindow) {
    var ws = new MozWebSocket("ws://ipaddress:8887"); // LINE 20
    // var ws = new WebSocket("ws://ipaddress:8887");
    ws.onopen = function() {
    showToastMsg(aWindow, 'Sending');
    ws.send('data');
    ws.onmessage = function (evt) {
    showToastMsg(aWindow, 'Display')
    ws.onclose = function() {
    I have tried both MozWebSocket and WebSocket, but both of them gives me error similar to the following :
    > E/GeckoConsole(15569): [JavaScript Error: "ReferenceError: MozWebSocket is not defined" {file: "resource://gre/modules/XPIProvider.jsm -> jar:file:///data/data/org.mozilla.firefox/files/mozilla/sq4c77hi.default/extensions/[email protected]!/bootstrap.js" line: 20}]
    Anyone know what I need to import or do to be able to reference WebSocket?
    I just want to send data back and forth from my Firefox Android addon with my server side code using websocket. Any suggestions?
    I am just confused because I have this setup running on Firefox Desktop Addon with very similar code.
    I have a short code written at https://bitbucket.org/ykim320/kayo. The desktop firefox extension works fine. But I have having trouble getting mobile version of addon to send message and connect to server. If you have anyway you can connect to the server using firefox mobile addon any pointers will be appreciated. Thank you again.
    Any help would be very appreciated thank you!

    Ask your Problem in Addons developer forum
    *https://forums.mozilla.org/addons/

  • What the best way to create User defined table with ADDON purpose

    Hi folks, how are you ?
    I´m beginner in development to business one, and I m studying to develop ISV addons.
    But, during my exercises and analisys, I learned that have two ways to create tables and fields in business one. One way is throght by wizard in business one using Tools Menu > Configuration Tools > User Defined Tables >
    Obs: I ´m using Business One Patch Level 9.
    Other way, is create the tables and fields using DI API
    But, my question is. When I develop one addon, or one UDO form that uses one set of user defined tables or used defined fields that where created by the first way (by wizard in B1), how I deploy this in other business one installation ? The package process will ensure the creation of this tables in another enviroment or I must implement the creation of user defined tables using DI API so that this code is called during the installation?
    If in cases of addon develop I must use DI API to create user defined tables, How can I use my classes with this responsibility in package process ?
    Thanks my friends.

    Hi Renan,
    You just need to put your logic in to the startup of your application, after you've established your connection to the UI API and DI API. All this will be triggered in the constructor of your main class.
    namespace MyNamespace
    public class MyAddon
      bool runAddon = true;
      bool initialised = false;
      const string ADDON_NAME = "My Addon";
      public static void Main()
            MyAddon addOn = new MyAddon();
            if(runAddon)
                  System.Windows.Forms.Application.Run();
            else
             Application.Exit();
      public MyAddon()
            // Connect to SBO session for UI
            if(!SetApplication()) runAddon = false;
      private bool SetApplication()
            // Code goes in here to establish UI API and DI API connections
            // See SDK samples for examples
            // You should also define and filter the UI API events your addon will trap at this stage and create any menus
            // Call your routine to check if the required UDFs/UDTs exist on this company
            initialised = CheckInitialisation();
            if (!initialised)
               //  AddOn not yet intialised on this company so prompt the user to run the intialisation process
              int iResponse = app.MessageBox("The " + ADDON_NAME + " addon will now create all required fields and tables."
                                             + System.Environment.NewLine + System.Environment.NewLine
                                             + "WARNING: It is strongly recommended that all other users are logged out of this company "
                                             + "before running this process. Are you sure you wish to continue?", 2, "Yes", "No", "");
              if (iResponse == 1) initialised = InitialiseAddOn(); // Call your routine to create the objects
            return true;
    Kind Regards,
    Owen

  • AddOn Menu User Authorization

    I created and installed a new AddOn developed in house.
    My AddOn created a couple of menu options.
    Now, I got a problem as I would like to authorized some user access to those menu options but I cannot see my AddOn on General Authorizations form.
    What is the problem?
    Is that a license question?
    Thanks a lot,

    Kevin,
    In the SDK Help Center Documentation ... see the UserPermissionTree Object which is part of the DI API.  This should help.
    Eddy

  • Compatibility Licence for Addon

    Hi,
    I am gettting following error,
    module <Compatibility License for Addons> expired on <20080115>. Can anyone explain this message and is it possible to get rid of this message. Help much appreciated.
    Thanks
    Ronald

    Hello,
    the error message will not give effect if you have no addon developed by partner or implementor. here is the link stated that it will not expire until 2099
    https://websmp201.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000656214&_SCENARIO=01100035870000000183&_ADDINC=&_OBJECT=011000358700000768952007E
    but you must renew your license by sending the hardware key to your implementor. the implementor will download it from license key SAP Portal.
    Rgds,

  • I forgot my email addon problem

    hi i cant remember my login email for addons developer page, i just have the developer name ?
    i want to update the addon but cant !

    When you forget a password for any site; Go to that sites log-in
    page and select '''Forgot Password.''' An e-mail will be sent to your
    address on file with that site.

  • I'm an Add-on developer, I want to pack extension which has jquery libraries?

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/985240 /questions/985240]''
    I'm an Add-on developer, I want to pack my extension and get its skeleton and this extension has Jquery libraries?

    I am also addon developer. I use it like this :-
    I use the following example.xul:
    <?xml version="1.0"?>
    <overlay id="example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <head></head>
    <script type="application/x-javascript" src="jquery.js"></script>
    <script type="application/x-javascript" src="example.js"></script>
    </overlay>
    And here is an example.js
    (function() {
    jQuery.noConflict();
    $ = function(selector,context) {
    return new jQuery.fn.init(selector,context||example.doc);
    $.fn = $.prototype = jQuery.fn;
    example = new function(){};
    example.log = function() {
    Firebug.Console.logFormatted(arguments,null,"log");
    example.run = function(doc,aEvent) {
    // Check for website
    if (!doc.location.href.match(/^http:\/\/(.*\.)?stackoverflow\.com(\/.*)?$/i))
    return;
    // Check if already loaded
    if (doc.getElementById("plugin-example")) return;
    // Setup
    this.win = aEvent.target.defaultView.wrappedJSObject;
    this.doc = doc;
    // Hello World
    this.main = main = $('<div id="plugin-example">').appendTo(doc.body).html('Example Loaded!');
    main.css({
    background:'#FFF',color:'#000',position:'absolute',top:0,left:0,padding:8
    main.html(main.html() + ' - jQuery <b>' + $.fn.jquery + '</b>');
    // Bind Plugin
    var delay = function(aEvent) {
    var doc = aEvent.originalTarget; setTimeout(function() {
    example.run(doc,aEvent);
    }, 1);
    var load = function() {
    gBrowser.addEventListener("DOMContentLoaded", delay, true);
    window.addEventListener("pageshow", load, false);
    })();

  • Addon help. Was working, now not.

    Sorry folks, I have asked the writer but just want to keep options open.
    "Net usage item 1.2.337.1"
    It used to work.
    Now it constantly just gives a red circle with a white cross in it.
    But, if I RMB in it, and "visit ISP usage page" it works.
    So if it opens the link and can show me on a page, SOMETHING has changed, but where?
    Anyone else have this error?
    P.S.
    My ISP is bigpond.

    You contact the Addon developer
    *http://netusage.iau5.com/
    Who creates these add-ons?
    The add-ons listed here have been created by thousands of developers from our community, ranging from individual hobbyists to large corporations. All publicly listed add-ons are reviewed by a team of editors before being released. Add-ons marked as Experimental have not been reviewed and should only be installed with caution.

  • Solution for addons with memory leaks needed! (check / mark them)

    The Problem with Firefox is that there are a vary of plugins from other developers, but it could not be that users have to live with growing memory usage or memory leaks by these addons. This gives also Firefox itself a bad impression and I think there should be a solution to stop the trend because as a user I can not always identify what's the problem now and why the firefox-process gives no memory free but it makes firefox partially unusable if I have to open more than a few tabs.
    In my opinion also popular extensions that are used by a lot of people still have memory leaks or even the addon-developer does not know that his addon has one.
    Is there no possibility that firefox helps, that addons can't produce so many memory leaks or otherwise Mark them in the Addon repository if they have leaks or memory problems?!

    Being a rookie, I thought memory leaks weren't
    something that java developers had to worry about.No managing memory is what you don't have to worry about.
    That doesn't mean that your code still can't have memory leaks in it.
    Now I'm starting to get java.lang.outOfMemory
    Exceptions. My application just keeps eating up more
    more ram until.... kaboom!The garbage collector can only clean up stuff that is no longer being 'used'. If you hold references to stuff that you no longer use, then you are creating a leak.
    >
    I think I get the ram back when the java app exits.
    So I don't know, if this is technically a memory leak
    or not. But It's a problem; Is there some way to
    explicitly call the java garbage collector and then
    recover from a OutOfMemoryException?
    As I pointed out above, the garbage collector collects garbage. It isn't garbage until there are no more references. Leaks are caused by holding onto references even though they are no longer needed. The GC can't do anything about that.
    I would appreciate any responce. (even if it's just a
    one liner)
    Since it sounds like you are creating a professional application I would suggest that you buy either JProbe and/or OptimizeIt and run your app through them. They will find memory leaks. And as an added benifit will also allow you to determine the bottlenecks in your application.

  • CAN WE HAVE IF CONDITION IN QUERY GENERATOR

    Hi friends,
    am, trying to make use of if condition to obtain a set of values in query generator.  Its possible to retrieve the required result set using query analyser but not in query generator.  am trying to execute the following query
    if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 1 and owor.itemcode = '100-100')
    begin
                    select itt1.u_reactor1 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
    end
    else
    if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 2 and owor.itemcode = '100-100')
    begin
         select itt1.u_reac_23 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
    end
    else
    if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 3 and owor.itemcode = '100-100')
    begin
         select itt1.u_reactor4 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
    end
    if it is not possible to write such query in query generator  can someone help me with a workaround solution.
    Thank u
    Vaitheeswaran

    Hi,
    I dont think Nested IF Statements are allowed in PLD. The reason that u get the result in Query analyser and not in Query Generator is that SAP supports Transact SQL and many SQL Server 2000 functions are not supported.
    However there is a work around in Print Layout Designer for using IF condition by having Linked Objects. Kindly see some tutorials regarding Linked fields available on SDN site and think of some other way of implementing this nested IF query.
    Regards
    Rizwan Hafeez
    Team Lead
    SAP Addon Development Section
    Abacus Consulting - Pakistan

  • Default Query Print Layout problem

    Hello:
        I have a query below SELECT T0.[ItemCode], T0.[Dscription], sum(T0.[Quantity]) as 'Quantity' FROM INV1 T0 WHERE month(T0.[DocDate]) =month([%0]) AND  year(T0.[DocDate]) = year([%0]) and T0.[ItemCode] IS NOT NULL GROUP BY T0.[ItemCode], T0.[Dscription] ORDER By T0.[ItemCode].
        Which basically output monthly inventory invoiced qty. It works fine. However when I try ti link to the default system print layout and try to print. The column 'quantity' become very small and cut off most of the number. How do I make it bigger? I have been trying to modify it for quiet a while now. Nothing seems to work. I think it's length is preset base on the column lenth in the table! If that's the case how do I make it wider?
        Also the default layout for user query are pretty weired. I think it's dynamically allocating spaces depends on number of column. But what happens when you do functions such as sum, avg..etc. There is no present length. So they just disregard it?
      Any help will be appreciated.. Thank You
    Sincerely Yours
    Bo Peng

    Hi Bo,
    I am asuming that u are not yet familiar with how to work with PLD (Print Layout Designer). I would suggest that u see some tutorials from the following link and then try to change that default layout according to ur own requirements
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/51c19891-0901-0010-6eb1-e71abf09298a
    Reagrds
    Rizwan Hafeez
    Team Lead
    SAP Addon Development Section
    Abacus Consulting - Pakistan

Maybe you are looking for