I'm attempting to get the XML for a UDT through DI-API. Here is a sample of the code I am using.
UserTable udt = this.company.UserTables.Item(1); udt.GetByKey("ABC"); this.company.XmlExportType = BoXmlExportTypes.xet_NodesAsProperties; string xml = udt.GetAsXML();
The call to GetAsXML() fails with the following exception.
The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) System.Runtime.InteropServices.COMException
In my debugger I can get access to the udt. For example udt.Name and udt.UserFields.Fields.Item(1).Value return the correct values. This tells me that the data is being loaded into the UDT, however the generation of XML is failing.
I am running SAP Business One 2005 A (6.80.318) SP: 01 PL: 16. I have checked the forum for this error and tried the solution of removing my '680318' folder in my temp directory.