Skip to content

[Bug]: ICInboxOutboxMgt modifies Sales Header and Purchase Header without permission in the codeunit #5635

@Wiechardt

Description

@Wiechardt

Describe the issue

The CreateOutboxSalesDocTrans procedure modified the Sales Header but the codeunit does not have permissions added, this causes an error when a user without direct modify permission to the Sales Header to approve a Sales Document which triggers the inter-company process.

Image

Expected behavior

The codeunit should be modified to add permissions to the the Sales Header and Purchase Header tables as shown below:

codeunit 427 ICInboxOutboxMgt
{
Permissions = TableData "General Ledger Setup" = rm,
TableData "Sales Header" = rm,
TableData "Sales Line" = rm,
TableData "Purchase Header" = rm,
TableData "Purchase Line" = rm;

Steps to reproduce

Create a new user (User1) and assign permissionsets to the user that only allows Indirect Modify on the Sales Header and Sales Line tables.

Get another user (User2) with direct modify and insert permissions to these table to create a new Sales Invoice and ensure the Customer on the Sales Invoice is a Customer with an IC Partner Code assigned to it. Send the Sales Document for approval.

Now login with User1 and attempt to approve the Sales Invoice.

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Labels

ApprovedThe issue is approvedFinanceGitHub request for Finance area

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions