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

How to disable notes?

(0) ShareShare
ReportReport
Posted on by 555

Hi experts,

In my Business Central cloud app, I have made an extension where my new table has notes attached to it using a factbox like this on the page:

area(factboxes)

{
    systempart(Notes; Notes)
    {
        ApplicationArea = Notes;
        Visible = true;
    }
}
It works fine, but I don't want the user to change the notes that are attached to a specific table number.
I cannot make a table extension for the table "Record Link" and I cannot see which pages, I must extend. The notes must not be altered and must not be deleted. But it must be possible to press it and read the full text in view-only-mode.
I hope you can help me.
  • Suggested answer
    NAV_with_Narang Profile Picture
    2,410 Moderator on at

    Please check if you can do it by assigning the users specific permission sets

  • Suggested answer
    Morten Steengaard Profile Picture
    555 on at

    Hi Rahul,

    Thank you for your reply.

    It might work, but before I tried it, I found out that I can solve the problem by making these event subscriptions:

       [EventSubscriber(ObjectType::Table, Database::"Record Link", 'OnBeforeModifyEvent', '', false, false)]

       local procedure OnBeforeModifyEvent(var Rec: Record "Record Link"; var xRec: Record "Record Link"; RunTrigger: Boolean)

       begin

           if Rec."Record ID".TableNo() = Database::"my table" then begin

               Message('Modify is not allowed...');

               Rec.Note := xRec.Note;  // undo the change

           end;

       end;

       [EventSubscriber(ObjectType::Table, Database::"Record Link", 'OnBeforeInsertEvent', '', false, false)]

       local procedure OnBeforeInsertEvent(var Rec: Record "Record Link"; RunTrigger: Boolean)

       begin

           if Rec."Record ID".TableNo() = Database::"my table" then begin

               Message('New note/link is not allowed...');

           end;

       end;

       [EventSubscriber(ObjectType::Table, Database::"Record Link", 'OnBeforeDeleteEvent', '', false, false)]

       local procedure OnBeforeDeleteEvent(var Rec: Record "Record Link"; RunTrigger: Boolean)

       begin

           if Rec."Record ID".TableNo() = Database::"my table" then begin

               Message('Delete is not allowed...');

               Error('Delete is not allowed...');     // This error message is never shown, but it prevents the record from being deleted

           end;

       end;

    Once again, thank you for your time.

    Best regards,

    Morten

  • Suggested answer
    Deekshitha Reddy Profile Picture
    219 on at

    Please try AccessByPermission property

    learn.microsoft.com/.../devenv-accessbypermission-property

    Hope this Helps.

    Please let me know

  • Morten Steengaard Profile Picture
    555 on at

    Hi Deekshitha Reddy,

    It might work, but I'll use the solution, I have written above.

    Best regards,

    Morten

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 719 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 410 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 369 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans