Skip to Content
author's profile photo Former Member
Former Member

Why can't I load system form as xml file (with LoadBatchAction method)?

As promissed in the webex session here is the answer to this question:

The partner had complained that after saving a system form as xml file he is not able to load it to

SAP Business One application using the method: LoadBatchAction.

In order to be able to load a system form from an xml file, first you have to update the unique ID (@uid) node value (in the xml string).

For example please look at the code below:

I've saved order form as an xml file (with GetAsXml method) and call the file "OrderXML.xml".

In order to load this form I use the following code:

Dim Strxml As String

Set oXMLDoc = New MSXML2.DOMDocument

oXMLDoc.Load ("C:KnowledgeBaseMikCOM UILoadXMLFrmWithMtxOrderXML.xml")

'In the following line I update the Unique ID node in the xml file

oXMLDoc.selectSingleNode("Application/forms/action/form/@uid").nodeValue = "MyOrderFrm"

m_App.LoadBatchActions oXMLDoc.xml

'Notice that you refer to the same unique id you've updated the xml with

Set Frm = m_App.Forms.Item("MyOrderFrm")

one more tip:

If you want to be able to have more than one instance of a form at the same time -each one of the instances must have a different Unique ID. You have to manage it by yourself.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2004 at 01:20 PM

    Hi Miki,

    thanks a lot for the information.

    Hi (to anybody who's reading this),

    I propose, two things:

    1. You might use a prefix like "INFO: " for the topic, so that it is at least easier to find these posts again in future when there are - hopefully - much more posts in the forum.

    2. You might consider to reply to your "INFO: " post by yourself, so that it's not listed with "0" replies - as I'm at least once a day monitoring the forum looking for new posts I could reply to...



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.