BLOB storage changes in Business Central 15.0

by Aug 3, 2019AL Language

Home 9 Development 9 AL Language 9 BLOB storage changes in Business Central 15.0

With upcoming new major version of Business Central (2019 wave 2 /15.0), there is a lot of breaking changes that we have to work with.

One of the first any developer probably find out is warning about using of TempBlob record variable. This record is usually used as a way how to work with BLOB fields and contains some very useful functions.

With BC 15, the whole functionality is replaced with new module called “BLOB Storage Module” that has better design and is able to be better extended in upcoming versions. So if you open a project that contains definition for TempBlob Record variable, you will se warning like “Table ‘TempBlob’ is marked for removal. Reason: Replaced by BLOB Storage Module.”.

How to solve the warning?

For the most cases the fix is really simple. You have just to replace definition of TempBlob Record variable with TempBlob Codeunit variable definition. All the functions from Record TempBlob are copied in to Codeunit TempBlob.

 codeunit 50100 "TKA Blob Tests"
 {
    procedure TestBlob()
    var
        InStream: InStream;
        TempBlob: Record TempBlob temporary;
    begin
        TempBlob.Blob.CreateInStream(InStream, TextEncoding::UTF8);
    end;
 }

 codeunit 50100 "TKA Blob Tests"
 {
    procedure TestBlob()
    var
        InStream: InStream;
        TempBlob: Codeunit "Temp Blob";
    begin
        TempBlob.CreateInStream(InStream, TextEncoding::UTF8);
    end;
 }

If you are interested in details of BLOB Storage Module, see GitHub documentation.

Recent Articles from the category

BC Open Source? How to start?

BC Open Source? How to start?

BC Open Source? How to start? One of the most exciting news introduced last month in Lyon during Directions EMEA 2023 was the changes to the open-source initiative. This means that you can now contribute to the source code of the Base app and the System app, which are...

read more
Validate a FlowField Field. Wait? What?

Validate a FlowField Field. Wait? What?

Validate a FlowField Field. Wait? What? There are not many things in the AL Language that surprised me. However, last week, I found one such thing - I reviewed customizations made by another partner and had to analyze the OOTB code of the Demand Forecast matrix. I run...

read more
Dynamics NAV 2013 & Expired Cronus License

Dynamics NAV 2013 & Expired Cronus License

We found an interesting problem - we were not able to run the development environment for Dynamics NAV 2013. Whenever we tried to run the development client, we got the following error message: "Your program license has expired" and the development client has closed...

read more
Indirect Dependencies and Access Modifiers

Indirect Dependencies and Access Modifiers

Last week, there was a discussion on Yammer on how to get values from the "Sent Email" record when all fields are marked as Internal. I was surprised that many people do not know what can/can't access modifiers (such as local, protected, or internal) be used for. I...

read more
AL Extensions: Replace Document Attachment

AL Extensions: Replace Document Attachment

I have published a new simple, open-source extension that allows replacing existing document attachments in all master entities as well as in open documents. The source code as well as the app file that can be installed in your environment is available on my GitHub...

read more

Sign Up for News

Certifications

Highest certification
Microsoft Data Management and
also in D365 Business Central

Microsoft Certified: Dynamics 365 Business Central Functional Consultant Associate

See other certifications here