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)
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)
Hi Deekshitha Reddy,
It might work, but I'll use the solution, I have written above.
Best regards,
Morten
Please try AccessByPermission property
learn.microsoft.com/.../devenv-accessbypermission-property
Hope this Helps.
Please let me know
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
Please check if you can do it by assigning the users specific permission sets
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156