Hi, How can i convert outStream object to Text in Business Central Wave 2 ?
previously i was doing this;
tempBlob.Init();
TempBlob.Blob.CreateOutStream(Ostream);
Xmlport.Export(70112320, Ostream, glAccount);
StreamText := tempblob.ToBase64String();
exit(StreamText);
how can I achieve this in wave 2 ?
Just create instream from your tempblob and pass it to Base64 Convert codeunit.
TempBlob.CreateInStream(InStream);
thanks Vigneswaran, Is there any way to pass OutStream object to ToBase64 method, it accepts InStream but not OutStream object?
Hi,
function ToBase64String moved to 4110 "Base64 Convert" codeunit and it has following overloading methods.
ToBase64(String: Text): Text
ToBase64(String: Text; InsertLineBreaks: Boolean): Text
ToBase64(InStream: InStream): Text
ToBase64(InStream: InStream; InsertLineBreaks: Boolean): Text
Create variable for the Codeunit and pass stream as argument into ToBase64String function
for more business central breaking changes follow below link and see Base64 Convert Module
https://github.com/microsoft/ALAppExtensions/blob/master/BREAKINGCHANGES.md#base64-convert-module
Note : make sure you are using right symbols. get latest docker container of Business Central Release Wave 2 and download symbols again with BaseApp and SystemApp Dependencies
ToBase64 method accepts text as parameter, how to convert stream into text in wave 2 ?
Use codeunit "Base64 Convert" to convert to base64.
Ex : ReturnValue := Base64Convert.ToBase64(stream);
Sohail Ahmed
807
YUN ZHU
764
Super User 2025 Season 1
Mansi Soni
529