Requirement is to create a XML string from D365 Finance & Operation using X++ & downloading it into the user’s browser as a XML file.The purpose of this sample code is to show you how we can convert string or text value into a byte array, converting byte array into memory stream the download it into the user’s browser as a XML file.
Sample Code
[code language = “cpp”]
System.Byte[] reportBytes = new System.Byte[0]();
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
reportBytes = enc.GetBytes(‘YOUR XML STRING/TEXT’);
System.IO.MemoryStream stream = new System.IO.MemoryStream(reportBytes);
FileUploadTemporaryStorageResult result = File::SendFileToTempStore_GetResult(stream, ‘abcd.xml’);
Message::Add(MessageSeverity::Informational, result.getDownloadUrl());
Browser().navigate(result.getDownloadUrl(), true);
[/code]
In older version of Microsoft Dynamics AX , there is no option to use concept of ‘Column Store’.But in Microsoft Dynamics 365 Finance & Operations you can set the “IndexType” property of a index in a table.There are 2 values available – 1) Index 2)ColumnStore.
A columnstore index stores data in a column-wise or in columnar format where as index stores data in a row -wise format.
Columnstore index is to reduce I/O, which can have a direct impact on query performance as comparison to index.
Columnstore is designed to speed up data-warehouse queries & read-Only operations.
Columnstore is better for OLAP whereas index is better for OLTP.
Microsoft Dynamics AX, Microsoft Dynamics 365 for Finance and Operations, D365 FO, Retail, SQL, Microsoft Power Apps, Microsoft Power BI, Microsoft Azure, Logic Apps, Microsoft Flow, Microsoft power automate, Microsoft Power Platform,.Net, X++, C#, Power BI DAX, Data Warehousing, Microsoft Analysis Services, SQL Server Reporting Services