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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Blob field not displaying on page

(0) ShareShare
ReportReport
Posted on by 911

I've created a table and a page in a BC extension. One of the fields in the table is of type: BLOB. It is not displaying on the page. I've tried to replicate what happens with the 'Work Description' BLOB field in the Sales Header table / Sales Invoice page. Where am I going wrong? See my code below. Thanks in advance for help.

table 50050 LogSheets
{

fields
{
// Various fields...

field(9; DescriptionOfTasksPerformed; BLOB)
{
Caption = 'DescriptionOfTasksPerformed';
}
}

var
ReadingDataSkippedMsg: Label 'Loading field %1 will be skipped because there was an error when reading the data.\To fix the current data, contact your administrator.\Alternatively, you can overwrite the current data by entering data in the field.', Comment = '%1=field caption';

// Cribbed from Sales Header (table & page) - WorkDescription
procedure GetTasksDescription() TasksDescription: Text
var
TypeHelper: Codeunit "Type Helper";
InStream: InStream;
begin
CalcFields(DescriptionOfTasksPerformed);
DescriptionOfTasksPerformed.CreateInStream(InStream, TEXTENCODING::UTF8);
if not TypeHelper.TryReadAsTextWithSeparator(InStream, TypeHelper.LFSeparator(), TasksDescription) then
Message(ReadingDataSkippedMsg, FieldCaption(DescriptionOfTasksPerformed));
end;

procedure SetTasksDescription(NewTasksDescription: Text)
var
OutStream: OutStream;
begin
Clear(DescriptionOfTasksPerformed);
DescriptionOfTasksPerformed.CreateOutStream(OutStream, TEXTENCODING::UTF8);
OutStream.WriteText(NewTasksDescription);
Modify;
end;

}

// ---------------------------------------------------

page 50051 LogSheetCard
{
Caption = 'Log Sheet';
PageType = Document;
RefreshOnActivate = true;
SourceTable = LogSheets;

layout
{
area(Content)
{
group("LogSheetDetails")
{
// Various fields...
}
group("Tasks")
{
Caption = 'Description of tasks performed';
field("DescriptionOfTasksPerformed"; Rec.DescriptionOfTasksPerformed)
{
ApplicationArea = Basic, Suite;
Importance = Additional;
MultiLine = true;
ShowCaption = false;
ToolTip = 'Description of tasks performed';
Editable = true;

trigger OnValidate()
begin
Rec.SetTasksDescription(TasksDescription);
end;
}
}
}
}
var
TasksDescription: Text;

trigger OnAfterGetRecord()
begin
TasksDescription := Rec.GetTasksDescription;
end;
}

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    On the page you want to display the blob field you need to to a calcfields( DescriptionOfTasksPerformed) for it to show if the content of the blob filed can be displayed in bc.

  • Nick Webb Profile Picture
    911 on at

    Thanks for your prompt response.

    At the bottom of the posted code there's the line: trigger OnAfterGetRecord. This in turn calls GetTasksDescription, which in turn calls CalcFields(DescriptionOfTasksPerformed);

    ... and yet still no box is displayed on the page under 'Description of tasks performed' (see below)?

    I've confirmed that these lines of code are being called by putting Message lines in the relevant procedures. It's a puzzle.

    anydesk00138.png

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 715 Super User 2026 Season 2

#2
AndrewThomas81 Profile Picture

AndrewThomas81 390 Super User 2026 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 386 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans