Adding a permission set for a single codeunit in BC?

IvonaKIvonaK Member Posts: 115
Hi all,

I'm using a BC (SaaS) and I have created a new Codeunit: 6000 "Test" with some subscribers to the Tables: "Sales Line" and "Purchase Line":

[EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnBeforeValidateEvent', 'Quantity', false, false)]
local procedure SalesLine_OnBeforeValidateEvent_Quantity(var Rec: Record "Sales Line"; var xRec: Record "Sales Line"; CurrFieldNo: Integer)

[EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterValidateEvent', 'No.', false, false)]
local procedure OnAfterValidateEvent_SalesLine_No(var Rec: Record "Sales Line"; var xRec: Record "Sales Line")

[EventSubscriber(ObjectType::Table, Database::"Purchase Line", 'OnBeforeValidateEvent', 'Quantity', false, false)]
local procedure PurchaseLine_OnBeforeValidateEvent(var Rec: Record "Purchase Line"; var xRec: Record "Purchase Line"; CurrFieldNo: Integer)

So my question is: Do I need to create a permission set that includes this singe Codeunit, or I can set

InherentPermissions = X;
InherentEntitlements = X;

inside the codeunit.

Any advice :smile:

Thanks


Answers

  • DanielGorskiDanielGorski Member Posts: 14
    Yes you need a permission set for that Codeunit. You can add this permissionset manually to users or you extend the necessary permission sets.
  • IvonaKIvonaK Member Posts: 115
    Thanks.
Sign In or Register to comment.