How to Transfer Files through API using Base64 Stream to Business Central

Transferring data from Business Central Tables through API is one of the latest version of transferring data from or to Business Central using the API Page Objects or Web Services.

Well, it gets a little difficult to transfer file blobs using the Media.ReadLinks and Media.EditLinks JSON field.

Read more…

Convert Base64 with AL code

A couple of weeks ago, I was trying to write web service examples in AL code for VS Code. Unfortunately, at that time, it was not possible to call the Base64 methods on the TempBLOB table. And because those functions on the TempBLOB table are using .Net, I figured it was going to take a while before we get Base64 support in AL code. So I decided to write Base64 encoding / decoding routines myself. Just as an excercise and at that moment I didn’t know if I would even succeed.

Bron : Kauffmann @ Dynamics NAV
Lees meer…

Decode Base64 BigText

With this code you can decode a BigText variable with a Base64 coded string (in this case a PDF document)….

  • abpBigPDFText -> BigText
  • abpAutConvertBase64 -> DotNet ‘mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’.System.Convert
  • abpAutBytes -> DotNet ‘mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’.System.Array
  • abpAutMemoryStream -> DotNet ‘mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’.System.IO.MemoryStream
  • abpOutStream -> OutStream
  • abpRecTempBlob -> Record TempBlob

[snippet id=”1578″]