Skip to content

Conversation

Copy link

Copilot AI commented Oct 29, 2025

Issue #29330 requests adding an OnAfterCreateDim event to table 5851 "Invt. Document Line" in the base application.

Problem

Table 5851 "Invt. Document Line" is a base application table that does not exist in this repository. Per the README, base application contributions must be made in the BusinessCentralApps repository (private, requires access).

Evidence

  • ALAppExtensions contains only extension apps (table extensions, event subscribers, new tables)
  • No base application table definitions found (searched by table ID 5851, table name, and similar patterns)
  • Only extensions of base tables exist (e.g., InvtDocumentHeaderCZL.TableExt.al extends but doesn't define the base table)

Request

Either:

  1. Transfer issue to BusinessCentralApps repository for implementation
  2. Clarify the workflow for base application event requests filed in this public repository

The requested event follows standard patterns (similar to OnAfterCreateDim in Sales Line, Transfer Line) but cannot be implemented without access to base application source.

Original prompt

Handle the event request at #29330

Guidelines for Handling Event Requests in D365 Business Central

Partners often request modifications to existing events or the addition of new events in the codebase to enable extensibility. Follow these rules when implementing such changes:


1. Adding a New Event

  • Only add the event asked for in the request
  • Event Naming Convention:
    Use the following structure:
    On + (Before if at the start of a procedure / After if at the end) + [ProcedureName] + On + [ActionDescription]
    Example: OnBeforePostOnValidate
  • Partners usually suggest an initial name, but it may not follow the correct convention. Adjust it as needed.
  • Declare the new event after all other procedures in the file.

2. Modifying an Existing Event

  • Add any new parameters at the end of the event’s signature.
  • Follow Business Central naming conventions for parameters:
    • PascalCase for names.
    • Use TableName for a Record from the table TableName.
    • Apply standard AL naming practices consistently.

3. General Rules (Always Applicable)

  • Requests for IsHandled patterns are rejected by default
  • Make changes first in the W1 layer, then propagate them to localized region and country folders.
  • Only add the code required for the event; do not remove any existing code.
  • When calling the event, use parameters that already exist as variables in the current file.
  • Ensure the file remains valid AL syntax after your changes.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add new event based on request 29330 Unable to implement event request #29330 - base application code not in repository Oct 29, 2025
Copilot AI requested a review from attilatoury October 29, 2025 08:34
@JesperSchulz JesperSchulz added the internal Internal pull request. Not a product change. label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Internal pull request. Not a product change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants