Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Record TempBlob to Codeunit "Temp Blob" function problems

Posted on by 422

So i'm busy replacing all the old code that contains the Record TempBlob to codeunit "Temp Blob". Now I've done most of the changes but there are 2 functions remaining that I don't see an immediate replacement for. Those are the "Init()" and "FromBase64String()" functions.

In what way can I solve this problem? 

Regards.

  • Suggested answer
    jdecottignies Profile Picture
    jdecottignies 217 on at
    RE: Record TempBlob to Codeunit "Temp Blob" function problems

    Hi,

    In temporary table TempBlob, FromBase64String was used to write your base64 string converted, into the Blob field.

    So now if you want to write a converted base64 string into your outstream you can use the "Base64 Convert" codeunit.

    There is two overloads for FromBase64.

    FromBase64(YourBase64String) returns YourBase64String converted

    FromBase64(YourBase64String, OutStream) writes YourBase64String converted into the Oustream passed in the second parameter.

    I wrote two examples of these methods you can use for your purpose: both of these downloads a file "myfile.txt" that contains "SGVsbG8gV29ybGQh" converted from Base64 (which means "Hello World!")

    pastedimage1577977116827v3.png

    => pastedimage1577977099260v2.png

    Hope it will help you

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans