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());

Similar Messages

  • 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());

  • 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

  • Is it possible to open AI files created with newer version of Illustrator?

    I am still using AICS2; I've noticed that files created in newer versions without PDF content will not open; is there any workaround for this? I'm missing out on lots of nice stuff....

    >is there any workaround for this?
    Open them in the appropriate version. You can download a 30-day demo of Illustrator 14. You can also ask the supplier to down-save for you.

  • Apps in "Open With" list appear more than once

    How do I fix this?

    Do the following:
    Open the Terminal application in your Utilities folder. At the prompt paste in the following command line (the entire text) then press return.
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/L aunchServices.framework/Versions/Current/Support/lsregister -kill -r -domain system -domain local -domain user

  • Can you create a form in which its never possible for the same person te sign the form more than once.

    Hi, I've been looking into this for awhile and believe the answer is 'no' but was just wondering if anyone here would know of a solution.
    The company I work for has a formulier on which a number of Excel files are placed. This form is then sent to a five (often different) people who are then required to open the Excel files and if accord to place their digital signature. We would like to make sure that no one is able to sign the form more than once and also if possible to make sure they have opened the Excel files. It would be great if anyone had any tips...
    All the very best,
    Martin Angell

    I am not an Excel or Excel-to-PDF conversion expert, so I do not know how Excel forms are converted to PDF form fields. With this caveat here's what I do know.
    In Acrobat It is possible to create a PDF form in which there are JavaScripts associated with fields (any fields, including signature fields). These JavaSripts can do a lot of things, including checking the signer's certificates on the already signed signature fields. Then you can make all unsigned signature fields read-only, in which case the user will not be able to actually sign them. After that you can overlay a button field on top of each unsigned signature field with exactly the same dimensions and associate a JavaAcript with this button field. This JavaScript would put up an UI asking the user for the signing certificate and its password, check this certificate's CN against the list of already signed signature fields and initiate the signing of the unsigned signature field behind this button if your condition is satisfied.
    I never tried that myself but it could work. This looks complicated and it is but if you really want it you can try.

  • Can Oracle Form Builder 10g open forms created with Developer 11g?

    Hi,
    Two different groups of developers developed forms in both Forms versions 10g and 11g. There will be call_forms between both versions and both will run under the same portal. Production is 10g. Is it possible to open 11g forms in 10g Form Builder? Suggestion/ solutions are appreciated.
    Thanks,
    Victor

    It is likely you will run into issues, so I would say best not to. I have done it a couple of times by accident during migration of Forms 10g to 11g. You can still open and view the 11g forms code in the Forms 10g builder, but will likely see some objects appear as incorrect types. Saving the 11g form in such a state from the 10g Forms Builder may result in corruption.

  • Forms created with Adobe Professional 10 can't be printed

    Hi,
    For some reason I have the problem that I have several forms and I want my clients to fill those out. The forms were created in Adobe Professional 9, and later created with the Adobe Professional 10 or actually with Adobe LiveCycle Designer. The forms were created in Word and adapted in livecycle designer.
    On my computer I as well have Adobe Reader 7. The forms are then sent from the customer back to me, but I can not print them using Adobe Professional 10, But there is the possibility to open the forms with Adobe Reader 7 and print it which works just fine.
    Now, the customer has to print out some forms on their own to sign them and send them back to us. As far as I am informed the customer has Adobe Reader 8 or 9, depending on the the department they work in.
    About a solution I would be very grateful.
    Thanks in
    advance!

    The forms are then sent from the customer back to me, but I can not print them using Adobe Professional 10,
    What happens when you print the forms?

  • 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

  • "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

  • Pages 5.5.1: When opening a document created with Pages '09 (Version 4.0) with Pages 5.5.1 the page header and the page footer are deleted. How can this be prevented? Or is this a bug in Pages 5.5.1?

    Pages 5.5.1: When opening a document created with Pages '09 (Version 4.0) with Pages 5.5.1 the page header and the page footer are deleted. How can this be prevented? Or is this a bug in Pages 5.5.1?

    Same problem here (no graphics in header or footer) and the problem has been reported months ago. It is another bug/feature lost when Apple moves from 09 to the iCloud-compatible versions.  Complain to Apple, you may have better chance than me and they may finally listen to their users....

  • Can't open DNG files created with Mac CS5 downloader in Mac CS4 Photoshop

    I recently installed CS5 on my mac but I kept CS4 installed as well.  I notice that I cannot open DNG files created with CS5 in Photoshop CS4.  Bridge CS4 shows the files only as icons - no image thumbnails.  I am able to open these same files on a Windows version of CS4.  Is there some plugin for my mac CS4 that will enable me to access the DNG files created with CS5?  Is there a way to use my CS5 downloader when converting my raw files from my camera to DNG files that will make them compatiple with PS and Bridge CS4?

    rr3rd wrote:
    Is there a way to use my CS5 downloader when converting my raw files from my camera to DNG files that will make them compatiple with PS and Bridge CS4?
    Well, yes...but you'll need to modify your DNG Converter prefs to allow for that. You''ll need a recent (ideally current DNG Converter 6.4.1 or above) and click on the DNG Converter preferences and select the correct DNG Converter options. Check DNG Converter 6.4.1 (the current version) and click on "Change Preferences" to be sure select Camera Raw 5.4 and later then make sure CS4 is updated to ACR 5.7 (which is the last version of ACR for CS4) However, the changes made to ACR 6.x really should be adopted since IQ for ACR 6.4.x is a lot better...

Maybe you are looking for

  • Item category TAC in grad Mode in sales Order

    Hi all, I am creating sales order with reference to sales contract but at the time of sales order we don't have enoff stock to deliver to customer , so we have deiced to Third party sales process But the problem is while creating a sales order with r

  • Missing Hard Drive Space/private root folder

    Hello Everyone! I've been having a problem with my iMac. Something seems to be eating up my hard drive space. I downloaded Disk Inventory X, and discovered I have a 200GB private folder under the root user!?! I've read on the forum that I shouldn't d

  • Spinning Ball 4 1 App. + No Activity Monitor!?

    So I'm having some issues with my G4, running 10.3.9. It is having real problems accessing a certain file and program. I haven't quite been able to reason it down to some corrupt application or file...I believe the problem is bigger than that. Not su

  • Image Rotation with AE SDK

    Hello all,    I am wondering if someone could suggest a desription of image rotation using Adobe AE SDK - in a Forum entry or in some other related document. While some elements of rotation may be considered available in SDK sample projects - Shifter

  • Firefox was working fine yesterday, but today it simply opens as a blank window. How can I fix this?

    When I open Firefox, it appears as a blank, black window with nothing to click on. Everything was working normally last night. Problem only appeared this morning. I tried System Restore, but it failed to complete successfully. I'm running Windows 7 o