📚 SAP Business One SDK Help

GetBusiness ObjectFromXML Method
See Also 
FileName

Specifies the full path and file name of the XML file that contains the business object data.

Index

Specifies the offset of the object within the file when using an XML file that contains more than one business object. Otherwise, set the value 0.

Description

Creates a new business object based on a valid XML file.

Syntax

Visual Basic
Public Function GetBusinessObjectFromXML( _
   ByVal FileName As String, _
   ByVal Index As Long _
) As Object

Parameters

FileName

Specifies the full path and file name of the XML file that contains the business object data.

Index

Specifies the offset of the object within the file when using an XML file that contains more than one business object. Otherwise, set the value 0.

Remarks

You can use this method to create business objects such as, BusinessPartners, Items, and so on. To create an empty object instead of an existing one from an XML file, you can use the GetBusinessObject method.

To release an object after using it, use the code line:

Set vbps = Nothing

To obtain the number of business objects included in the XML file, use the GetXMLelementCount method.

For more information and a sample, see Exchanging Data Using the DI API XML Capabilities and Loading Data from XML.

Example

See Also