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

The data cannot be shown because it is not valid

(0) ShareShare
ReportReport
Posted on by

Hi 

I'm using Business Central and I have a problem regarding creating notes thorough code. When the notes are created. They're not shown in the factbox.

It says: "the data cannot be shown because it is not valid"

The code I'm using is: 

if not RecordLink.get(LinkID) then begin
	RecordLink.Init();
	RecordLink.Validate("Record ID", ServiceHdr.RecordId);
	RecordLink.Validate("Link ID", LinkID);	
	RecordLink.Validate(Type, RecordLink.Type::Note);
	RecordLink.Validate(Created, CurrentDateTime);
	RecordLink.Validate(Company, CompanyName);
	RecordLink.Validate("User ID", UserId);
	RecordLink.Validate(Description, Rec.Description);

	RecordLink.Note.CreateOutStream(OutStr);
	OutStr.Write(Rec.ExtTextL);
	RecordLink.Insert();
end;

  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    It has never ever been possible to write programmatically in the system Notes field. This is by design since ages.

    The issue is related to the fact that there is a proprietary encoding and decoding of the Notes field.

    I have blogged about that limitation and all its details 10 years ago.

    community.dynamics.com/.../manage-notes-my-notifications-in-rtc-using-a-com-stream-wrapper

  • LewisH95 Profile Picture
    65 on at

    One would think the simple fix is to just remove the controls from the page. Wrong… The cause of the slowdown is not on the display itself (although the Dynamic Control does slow down performance), it’s the code that’s running in the background.

    The code you need to take out is in the triggers of the page.

    Removing code on the OnAfterGetRecord and OnAfterGetCurrRecord triggers dramatically improve the performance of the customer card.

    Note there are a lot of other things we have to remove from the customer card to make the performance acceptable for the end-user. But I will stop here for now.

    The Extension Problem

    So how do you do this when we’re going into the Extension world? Extensions will NOT allow you to remove base code, so you’re stuck with whatever crap Microsoft stuffs in there. Tested or not.

    Looking at the amount of code on the customer page, I’m actually shocked by how all of this got past Quality Control at Microsoft.

    Whoever thought it was a good idea to do a lot of rendering and processing at the page level?

    You’re asking for performance problems when you’re rendering a large amount of data. This was one of the first things they taught us at the Navision development class back in 1999; don’t put code on forms/pages.

    I hope this information helps!

    Admin

    o365cloudexperts

  • Suggested answer
    Pablogrind Profile Picture
    41 on at

    Try this

    RecordLinkManagement: Codeunit "Record Link Management";

    RecordLinkManagement.WriteNote(RecordLink, Rec.ExtTextL);

    i have based on codeunit 454

  • aitorNAV Profile Picture
    35 on at

    I have the same issue. Tried your idea, but same error... May be we must assume that it's not possible

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 664 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 446 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 282 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans