title: How to generate the correct QrCode in Dynamics 365 FO
body: <p>I have a problem with generating the correct QR code on the report. Dynamics 365 version - Platform 8.1 Update 20.
  In the previous version of the system (platform 7.3 update 12) I used the method below and it worked, every phone with the camera and the readings for reading QR codes could read the code correctly, but after upgrading the system to version 8.1 the method stopped working, generates the code, but when trying to read him using the application receives the message "Unknown Encoding". Now the qr code appears on the report as before, but I can not read it. Do you have any idea why this is happening?</p>
  
  <pre><code>Microsoft.Dynamics.ApplicationSuite.QRCode.Encoder qrCode = new 
  Microsoft.Dynamics.ApplicationSuite.QRCode.Encoder();
  System.IO.MemoryStream   memoryStream = new System.IO.MemoryStream();
  System.Drawing.Bitmap    bitmap;
  container                imageContainer;
  System.String            url = '1w23e4r5t67';
  bitmap = qrCode.Encode(url);
  bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat::Png);
  imageContainer = Binary::constructFromMemoryStream(memoryStream).getContainer();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/i30PJ.jpg" rel="nofollow noreferrer">Example qr code generated by this code</a></p>