📚 SAP Business One SDK Help

GetDataInterfaceFromXMLFile Method
See Also  Example
bstrFileName

Specifies the path and file name of the XML data.

Description

GetDataInterfaceFromXMLFile

Syntax

Visual Basic
Public Function GetDataInterfaceFromXMLFile( _
   ByVal bstrFileName As String _
) As Object

Parameters

bstrFileName

Specifies the path and file name of the XML data.

Example

This is a VB.NET sample that shows how to get a Message Inbox from an existing XML file.
GetDataInterfaceFromXMLFile (Visual Basic)Copy Code
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oMessageService As MessagesService
Dim oMessageInbox As MessageHeaders
Dim oInboxFromFile As MessageHeaders
Dim oInboxFromString As MessageHeaders
Dim oMessageHeader As MessageHeader

'get company service
oCmpSrv = oCompany.GetCompanyService

'get msg service
oMessageService = oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)

'get message inbox
oMessageInbox = oMessageService.GetInbox

'save inbox to file
oMessageInbox.ToXMLFile("c:\MyInbox.xml")

'create a new inbox data structure and fill it with the data from
'the xml file
oInboxFromFile = oMessageService.GetDataInterfaceFromXMLFile("c:\MyInbox.xml")

'get first message header
oMessageHeader = oInboxFromFile.Item(0)

See Also