📚 SAP Business One SDK Help

GetDataInterfaceFromXMLString Method
See Also  Example
bstrXMLString
XML string.

Description

Creates a data structure from a specified XML string.

Syntax

Visual Basic
Public Function GetDataInterfaceFromXMLString( _
   ByVal bstrXMLString As String _
) As Object

Parameters

bstrXMLString
XML string.

Example

Shows how to get Company Admin Info from an XML string.
GetDataInterfaceFromXMLString (Visual Basic)Copy Code
Dim oCompanyService As SAPbobsCOM.CompanyService
Dim oCompanyAdminInfo As AdminInfo
Dim oCompanyAdminInfoXmlStr As AdminInfo
Dim sCompanyAdminInfoXmlStr As String

'get company service
oCompanyService = oCompany.GetCompanyService

'get admin info
oCompanyAdminInfo = oCompanyService.GetAdminInfo

'save data to xml string
sCompanyAdminInfoXmlStr = oCompanyAdminInfo.ToXMLString()

'create CompanyAdminInfo from xml string
oCompanyAdminInfoXmlStr = oCompanyService.GetDataInterfaceFromXMLString(sCompanyAdminInfoXmlStr)
Shows how to remove a Finance Period
RemoveFinancePeriod (Visual Basic)Copy Code
Dim oCompanyService As SAPbobsCOM.CompanyService
Dim oFinancePeriodParams As FinancePeriodParams

'get company service
oCompanyService = oCompany.GetCompanyService

'create finance period data structure
oFinancePeriodParams = oCompanyService.GetDataInterface(CompanyServiceDataInterfaces.csdiFinancePeriodParams)

'fill the code of the finance period
oFinancePeriodParams.AbsoluteEntry = 13

'remove finance period
oCompanyService.RemoveFinancePeriod(oFinancePeriodParams)

See Also