cancel
Showing results for 
Search instead for 
Did you mean: 

How to use XML string for GetBusinessObjectFromXML method instead of file?

0 Kudos

Hi,

Is it possible to get SAP Business One object from XML string without saving xml file on hard disk using DI-API?

I found method oCompany.GetBusinessObjectFromXML(someXMLFile,0) and it works good if you have xml files on your hard drive. However, I am interested in solution without saving files on hard drive. For example, I have C# string with XML A/R Invoice inside and I would like to get B1 A/R Invoice object from that XML.

SAP Business One 9.x, SQL version

Thanks,

Sergei

Accepted Solutions (1)

Accepted Solutions (1)

former_member233854
Active Contributor

Hi,

Yes, set your Company property XMLAsString to true before reading the XML

oCompany.XMLAsString = true

Answers (1)

Answers (1)

0 Kudos

It works. Thank you very much 🙂