How to increase formUID to a form created with screen painter

Hi,
I've got a problem with my form. I created a form with screen painter but i can't succeed to increase my UID form.
For example, when i open my first form, the UID is always at FP_0.
My script:
private string FormUID = null;
  public FP_Form(int NumInstance_)
            this.NumInstance = NumInstance_;
this.FormUID = "FP" + NumInstance.ToString();
            load();
          oDBDataSource = oForm.DataSources.DBDataSources.Add(DBDataSourceTable);
          SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent);
private void SBO_Application_ItemEvent(string _FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
            BubbleEvent = true;
            try
if (_FormUID == this.FormUID) //here "_FormUID" is increased but "this.FormUID" is still = FP_0
                    switch (pVal.EventType)// selon le type d'action executée
                        case SAPbouiCOM.BoEventTypes.et_FORM_LOAD:
                            if (pVal.BeforeAction == true)
                                SAPbouiCOM.ComboBox List_reseau = (SAPbouiCOM.ComboBox)oForm.Items.Item("5").Specific;
                                List_reseau.ValidValues.Add("1", "test");
                           break;
                       case ...
                          break;
Please help.
Regards,
Zakia.

Hi J.
The answer is yes You just have to give your form a unique id.
1) Give your form in screen painter a name like BTWO_DYNAMIC_UID (just plain text).
2) Make sure your <i>FormType</i> and <i>appformnumber</i> have a unique number (i.e. 2000060001). You can do this in the xml source.
3) By loading your document replace the BTWO_DYNAMIC_UID with an unique id. I have a counter that's a member of my class and increase that number to get a unique id (BTWO_F_1, BTWO_F_2 etc)
I have added a code sample, SBOApplication is my SAP application object and mFormNumber is a member (integer) of my class.
<i>Succes d'r mee, en als 't nie lukt hoor ik het wel... ;)</i>
<b>Code (C#):</b>
// New xml document
XmlDocument oXmlDoc = new XmlDocument();
private Form LoadUniqueForm(string AMyFile)
  // Define your path to
  sPath = @"Forms" + AMyFile;
  // Load the form
  oXmlDoc.Load(sPath);
  // Replace the string with an unique id
  mFormNumber++;
  string sXML = oXmlDoc.InnerXml.Replace("BTWO_DYNAMIC_UID", "BTWO_F_" + mFormNumber.ToString());
  // load the XML file in SAP
  SBOApplication.LoadBatchActions(ref sXML);
  // Return the form
  return SBOApplication.Forms.Item("BTWO_F_" + mFormNumber.ToString());

Similar Messages

  • Is it possible to open a form created with screen painter more than once?

    I have created a form with the screen painter. In the screen painter the form is assigned a FormUID. Probably because this is done, it is impossible to open the form more than once??
    Thanks,
    Kind regards

    Hi J.
    The answer is yes You just have to give your form a unique id.
    1) Give your form in screen painter a name like BTWO_DYNAMIC_UID (just plain text).
    2) Make sure your <i>FormType</i> and <i>appformnumber</i> have a unique number (i.e. 2000060001). You can do this in the xml source.
    3) By loading your document replace the BTWO_DYNAMIC_UID with an unique id. I have a counter that's a member of my class and increase that number to get a unique id (BTWO_F_1, BTWO_F_2 etc)
    I have added a code sample, SBOApplication is my SAP application object and mFormNumber is a member (integer) of my class.
    <i>Succes d'r mee, en als 't nie lukt hoor ik het wel... ;)</i>
    <b>Code (C#):</b>
    // New xml document
    XmlDocument oXmlDoc = new XmlDocument();
    private Form LoadUniqueForm(string AMyFile)
      // Define your path to
      sPath = @"Forms" + AMyFile;
      // Load the form
      oXmlDoc.Load(sPath);
      // Replace the string with an unique id
      mFormNumber++;
      string sXML = oXmlDoc.InnerXml.Replace("BTWO_DYNAMIC_UID", "BTWO_F_" + mFormNumber.ToString());
      // load the XML file in SAP
      SBOApplication.LoadBatchActions(ref sXML);
      // Return the form
      return SBOApplication.Forms.Item("BTWO_F_" + mFormNumber.ToString());

  • Add functionalities to form created in screen Painter

    Hello.
    Where I can find information or an example of as
    I can add functionalities to form created in screen Painter?
    Regards,
    Jose

    Hi David,
    I want add and modify a field of it_EDIT from my form.
    I find on the web this: BoFormItemTypes.it_EDIT.
    But same error.
    I am using this code:
        Private Sub CodeForm()
            Dim oitem As SAPbouiCOM.Item
            Dim oLabel As SAPbouiCOM.BoFormItemTypes
            oForm = SBO_Application.Forms.GetFormByTypeAndCount(60004 '// <<----
    this is my form, 0)
            oitem = oForm.Items.Item("10")
            oLabel = oitem.Specific
            oLabel = "Escribir nombre"
        End Sub
    But don't  function.
    Regards,
    Jose

  • Load form created by screen painter

    hello every one,
    i've a problem. What are the steps to be followed to load a form created by screen painter?  might i have any  sample code In order to understand the various phases? thank a lot

    hi
    lorenzo pelati
      first u   create  a  form in   screen painter , nd after save this form , when  u save this form than this fom  extation is  .srf file,   after that  convert this file  to  .xml
      file ,  and after call  this form to   our application ,
    follow this code.........................................
    in this code  newpa.xml     is a one form xml file.
    in this code   SBOFormEditor_13  is a screen painter  form id,
      private void LoadFromXML( ref string FileName ) {
            System.Xml.XmlDocument oXmlDoc = null;
            oXmlDoc = new System.Xml.XmlDocument();
            // load the content of the XML File
            string sPath = null;
            sPath = System.IO.Directory.GetParent( Application.StartupPath ).ToString();     
              sPath = System.IO.Directory.GetParent( sPath ).ToString();
              oXmlDoc.Load( sPath + "
    " + FileName );
            // load the form to the SBO application in one batch
              string sXML = oXmlDoc.InnerXml.ToString();
            SBO_Application.LoadBatchActions(ref sXML);
        private void SaveAsXML( ref SAPbouiCOM.Form Form ) {
            System.Xml.XmlDocument oXmlDoc = null;
            string sXmlString = null;
            oXmlDoc = new System.Xml.XmlDocument();
            // get the form as an XML string
            sXmlString = Form.GetAsXML();
            // load the form's XML string to the
            // XML document object
            oXmlDoc.LoadXml( sXmlString );
            string sPath = null;
            sPath = System.IO.Directory.GetParent( Application.StartupPath ).ToString();
            SBO_Application.MessageBox("sahe ha " + sPath, 1, "OK", "", "");
            // save the XML Document
            oXmlDoc.Save( ( sPath + @"\newpa.xml" ) );
      public   call form() {
            SetApplication();
            string transTemp0 = "newpa.xml";
            LoadFromXML( ref transTemp0 );
                    oForm = SBO_Application.Forms.Item("SBOFormEditor_13");
            // Show the loaded Form
            oForm.Visible = true;
            SaveAsXML( ref oForm );
       fallow this code .

  • Coding in form created in screen painter

    I have created a form in screen painter.How can I do coding in this form.I have added a save button in the form.How can I fire the click event on this button.The file created has extension srf and it can not be opened in asp.net.

    Hi Dilip,
    Although the file has a srf file extension it is actually an XML file. You can use this file to create an instance of your form through code. In the UI API there is a Application object. This object has a method called LoadBatchActions which takes one parameter which is your srf file (ie the path and filename). Calling this method will create a form in the active UI based on your srf file. You can then create an instance of the Form object in the UI API and use this to manipulate your form through code.
    I also recommend you look at the SDK learning material here on the SDN and also look at the samples that come with the SDK.
    Kind Regards,
    Owen
    P.S. Please note that you've posted your question in the application forum for SAP Business One. This forum is for discussions on the application functionality of SBO and not the SDK. Instead, please post queries about screen painter and other development questions here:
    SAP Business One SDK
    Thanks

  • How to delete hyperlink (Remove signature) in a form created with InfoPath

    Hello. 
    We have Sharepoint 2013 Foundation in production. It work with forms created with InfoPath. In these forms, digital signatures are used to approve. The problem is that once you have signed the forms, the user can remove the signature. That's what we want to
    avoid.
    Which file should I edit to remove the hyperlink? I can not find how to do it. Do you know a better option? 
    Greetings.
    MCSA: Windows Server 2008

    Hi,
    According to your post, my understanding is that you want to delete hyperlink (Remove signature) in a form created with InfoPath.
    As far as I know, there is no OOTB way to achieve this. You need to use custom code to prevent removal of digital signatures.
    Please add the OnBeforeChange handler code to the "signatureN" group where the signature is stored, not to the section you are signing.
    In other words (my excample) browse to :
    Tools - Form Options - Digital Signatures - "Enable digital signature for specific data" - Modify/Add
    Note the "Store signatures in the following group" value. It will be a read only value, eg /my:myFields/my:signature3/my:signature4
    Here is a similar thread for your reference:
    http://www.infopathdev.com/forums/p/3661/12829.aspx#12829
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • I have a online form created with my paid account that has just stopped working.

    I have a online form created with my paid account that has been working for months that just started displaying a message that starts "This form was easily created for FREE with FormsCentral. See how..." The inline frame that it shows up in has also changed to be very small. The form is set to open in FormsCentral and shows the message and inline frame size when I choose preview. What's up?

    Checked when I got back in to work today and everything is working as it should. All of our online forms were screwed up yesterday, but are working this morning. I know this won't help anyone in the future, but just wanted to follow-up.

  • I am unable to edit a form created with LiveCycle version 8.5 with LiveCycle Version ES1.

    I am trying to edit a form created with LiveCycle version 8.08.2073 (installed with Adobe Pro 8).  I am using LiveCycle version ES (installed with Adobe Pro 9).  I can open the fhe form, but the tools are greyed out.  It apears the file is locked for editing, but I cannot determine where/how to unlock it.

    You should try to start in safe mode which runs a file check. You hold the shift key down during a start up till there is a progress bar towards thr bottom of the screen. This start will take a longer time than normal. In safe mode try the functioins you are having problems with to see if there is an improvement. Some links below to read.
    http://support.apple.com/kb/ht1564
    http://support.apple.com/kb/ht1455

  • How I can see what accounts I created with my family pack in my old mobileme account?

    Any ideas how I can see what accounts I created with my family pack in my old mobileme account?
    i updated it when we need to migrate and all emails are active and being used.
    i need to update an email address. we use this for my personal company and need to keep the email in
    the same format so it matches the others in the company. i dont see it anywhere in my account now.
    i am using a .mac format. thanks.

    In order to see which devices are authorized on your account:
    Open iTunes
    Click Store
    Click Account
    Click View Account
    Enter your password
    Look in the second section iTunes in the Cloud
    To the far right you'll see Manage Devices
    Once it's clicked you will see all of the devices currently authorized in iTunes/on your account
    I was going to say, "Hope this helps," but based on the above, I'm pretty sure it did!
    Thanks guys...

  • How to find report created with Report Painter?

    Hi!
    how to find report created with Report Painter?
    Here is the information that I have:
    Object filename, let's say <b>Y_P01_90000001</b>
    Report painter object <b>INV-102</b>
    The thing is that Library is unknown, thats why I can not find it via GR22...
    Any ideas?
    Will reward,
    Mindaugas

    Check in GRR3 under <b>INV</b> node...

  • I have adobe xi pro, but i can´t edit a form create with adobe 8.0, the message is this form can´t be edit with adobe, use adobe livecycle designer. need I to buy another program?

    I have adobe xi pro, but i can´t edit a form created with adobe 8.0. The message is: this form can´t be edit with adobe, use adobe livecycle designer. need I to buy another program?

    If the form was created using LCD then it can only be edited there. This
    application used to be bundled with Acrobat Pro, but that's no longer the
    case. So if you want to edit this file then you need to purchase it, yes.
    On Sat, Apr 4, 2015 at 6:39 PM, monicad4417911 <[email protected]>

  • "Xml Form" Created with Form Builder  in a CO

    Is it possible to assign a "XML FORM" created with the tool Form Builder of Portal, and assign it to a CO?
    Regards
    David
    Message was edited by:
            David Valenzuela

    Is it possible to assign a "XML FORM" created with the tool Form Builder of Portal, and assign it to a CO?
    Regards
    David
    Message was edited by:
            David Valenzuela

  • How do I locate the folders I created with my downloaded music?

    How do I locate the folders I created with my downloaded music?
    Thanks for any information,
    Dawn

    I have no problem pulling up a complete list of downloaded music.  My problem exists with past downloads I put into a "Folder" then copied that folder to a CD.  A bit frustrating.
    Thanks for your input,
    Dawn

  • Problem with Folder created in Screen painter

    Hello,All
    I created six folder for UD screen with screen painter and i set pane level properties correctly. While running with screen painter we can see each and every item with respect to folder
    But the problem is while loading this user defined form in SAP B1 items related with folder is not coming. (Not at all coming any item under any folder) if will run same screen in screen painter items correctly.
    is der any coding is required for foder creation and manage
    By
    Firos.C

    Hi Firoz,
    You need to set a PaneLevel for each and every pane and that pane level is what you need to set as the From Pane and To Pane for the individual items within that corresponding pane.
    Say, you have a pane with PaneLevel = 3, then, for all the items within that pane, you need to have the from and to pane as 3.
    Hope this helps,
    Best Regards,
    Satish. B.

  • Dynamic FormUID For Forms Created with XML

    I'm able to load a form via XML using VB6 and the SDK (screen painter generated).  The problem is that I get an error if the form already exists and is loaded again due to the fact that I'm not able to assign a dynamic and unique FormUID on initial form creation like you can when creating a form via the SCG.  Is there a way to assign a unique FormUID on the fly using the SDK and an XML form?

    Hi Greg,
    After I read the XML from a file, I manually change the FormUID to a unique one via XML before I the XML into SBO. I have not found anything inside the SDK which does this, so unfortunately you have to do it yourself.
    Regards, Lita

Maybe you are looking for

  • When I try to open an image straight from bridge to PS cs5 it trys to open it in Painter

    Whwhat is causing Bridge to try to open images in painter

  • * help * - ipod playing up. . .

    hi there. i've got an ipod mini which has No songs on it whatsoever... its totally blank, yet when i load up iTunes its says i have over have the my ipod full of songs!? i've reset my ipod twice... reinstalled iTunes, nothing is happening, whats goin

  • HT1414 unable to download apps or update

    getting error when trying to upgrade or download a app HELP!

  • I have paid 35$ sub

    please respond... my last chat # 1692669 early this week. now I have payment proof number from master card that you asked it did go through paypal...reference ######## and paypal to skype3 ########## PLEASE MAKE MY SUBSCRIPTION VALID AND KEEP MY CRED

  • BBP_WFL_APPROV_BADI container element

    Could you please tell me how to read container of the shopping cart in the dynamic approver determination badi in n level item based workflow ? thanks ps.i copied for the object type bus2121 the existing code given for po and contract in the example