web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to write text field to blob?

(2) ShareShare
ReportReport
Posted on by 450

I'm trying to make an http request. Now I need to add a body to my request, that body has to be of the type Blob. 

At the moment I don't have a blob so my question is how I can convert the textfield I have now to an object to the type blob so I can use that in my requestbody.

Thanks in advance.

EDIT: 

With the tempblob record i created an outstream and added the text to it:

TempBlob.INIT;
OutStream.WRITETEXT(payload);
TempBlob.Blob.CREATEOUTSTREAM(OutStream);
TempBlob.INSERT;
TempBlob.CALCFIELDS(Blob);

Is it now ok if i simply do this to add it to the body?:
TempBlob.GET(TempBlob.Blob);
HttpWebReqMgt.AddBodyBlob(TempBlob);

I have the same question (0)
  • Suggested answer
    THE Italian Profile Picture
    on at

    You are in need to convert the blob back and forth into a 64base encoded string.

  • David Oliviera Profile Picture
    10 on at

    Great solution, thank you

  • SebastianBarlow Profile Picture
    10 on at

    Thanks for the help

  • Community Member Profile Picture
    on at

    empBlob.INIT;

    OutStream.WRITETEXT(payload);

    TempBlob.Blob.CREATEOUTSTREAM(OutStream);

    TempBlob.INSERT;

    TempBlob.CALCFIELDS(Blob);

  • Community member Profile Picture
    12 on at
    When dealing with text field to blob conversion, it's crucial to understand the intricacies. For a comprehensive guide, check out https://www.typingservice.org/blog/manual-vs-automated-transcription/. This resource not only sheds light on the manual vs. automated transcription debate but also provides valuable insights into optimizing text-to-blob processes, ensuring efficient data handling and storage.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans