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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Business Central forum

Issue with writing/reading blob field to and from the table

(0) ShareShare
ReportReport
Posted on by 505

I'm using business central online. 

My table has a blob field and I need to store web API authentication token into it.

When I make a call to web API for the first time, I store the generated token in the table so that it can be re-used next time when I make a web API call.

When I try to read the blob field from the table, it is always empty.

Here is my code.

// store token in the table

Config."Current Auth Token".CreateOutStream(OutStr);
OutStr.WriteText('test token');
Config.MODIFY();
//Retrieve token
if(Config."Current Auth Token".HasValue()) then begin
Config."Current Auth Token".CreateInStream(InStr);
Instr.ReadText(token)
End;
Categories:
I have the same question (0)
  • Priyank Bhavsar Profile Picture
    505 on at

    Perfect! Thanks a lot :)

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    I think you miss CALCFIELDS before creating the InStream object:

    Config.CALCFIELDS("Current Auth Token");

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans