Skip to content

[Bug]: Codeunit 80 - Sales-Post does not grant rimd permission to "Sales Header" table #29422

@Wiechardt

Description

@Wiechardt

Describe the issue

We want to be able to configure Permission Sets to allow one group of users to create and approve Sales or Purchase Documents (but not post) and another group of users to post the approved documents (but not create/modify or delete).

This is not possible as Codeunit 80 grants rimd permissions to the "Sales Line" table, but it does not grant rimd to the "Sales Header" table.

The users that are only supposed to post sales documents get an error "You do not have permission to modify the Sales Header table". when the code reaches the line below. Granting these users indirect modify permissions does not help because the codeunit itself needs additional permissions added and this cannot be done with a subscription to an event.

We are facing the same issue with the Purch-Post codeunit.

Image

Expected behavior

codeunit 80 "Sales-Post"
{
Permissions = TableData "Sales Header" = rimd,
TableData "Sales Line" = rimd,
...
}

codeunit 90 "Purch.-Post"
{
Permissions = TableData "Sales Header" = rm,
TableData "Sales Line" = rm,
TableData "Purchase Header" = rimd,
TableData "Purchase Line" = rimd,

Steps to reproduce

Add Indirect insert, modify and delete permissions to Table 36 to a user.
Try to post a Sales document.

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug
    Internal work item: AB#613337

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaapprovedThe issue is approvedbugSomething isn't workingships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions