Skip to content

[Event Request] codeunit 5980 "Service-Post" - OnInsertPostedHeadersOnBeforeInsertInvoiceHeader #30362

Description

@dfdias11

Why do you need this change?

The extensibility of Codeunit 5980 "Service-Post" is currently limited compared to the extensibility available in Codeunit 80 "Sales-Post".

In Sales-Post, the event OnInsertPostedHeadersOnBeforeInsertInvoiceHeader allows partners to override the standard logic that determines whether a posted invoice or posted credit memo should be created by using the IsHandled pattern.

In Service-Post, the equivalent decision is hardcoded:

Image

Because there is no event before this logic, extensions cannot support custom Service document types that should follow a different posting flow or create different posted documents.

Adding an event equivalent to the one available in Sales-Post would provide consistency across posting modules, reduce the need for workarounds, and enable partners to extend Service Management posting scenarios in a supported and upgrade-safe manner.

This request is especially important for solutions that introduce custom Service document types and need to control which posted document is generated during the posting process.

Describe the request

Please add a new Integration Event in Codeunit 5980 "Service-Post", before the standard logic that determines whether a posted service invoice or posted service credit memo will be created.

Requested behavior similar to the existing event in Codeunit 80 "Sales-Post":

Image

The event should be raised immediately before the following standard code:

Image

Using the IsHandled pattern would allow extensions to replace the standard decision logic and support custom Service document types, similarly to what is already possible in Sales-Post.

This would bring Service-Post extensibility in line with Sales-Post and enable supported customization of posted document creation during Service posting.
Internal work item: AB#643301

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions