We’re heading into the third week staying home, and with some weeks more ahead of us we need some entertainment.
Last week Eva asked me if we could create an app using the Power Platform to play mime games remotely with my colleagues at Axazure. She’d design it graphically and functionally and I’d (no) code it. And that’s what we did!
Since Microsoft Dynamics 365 for Finance & Operations is a cloud-based ERP we cannot work with files on the AOS drive anymore. It was pretty usual to have file-based integrations in AX where you got a file in a folder and processed it.
Edit: this code is valid for a single file ZIP. If the zipped file contains more than one file you must process each Stream inside the while.
We need to copy the unzippedStream stream (which is a DeflateStream) to a MemoryStream (which must be initialized) before returning it.
Remember that to access a .NET collection we need to use an enumerator to loop through it. If you don’t see the methods in the lookup using dot notation just write them, writing .NET code in X++ is still a bit buggy…