Dynamics 365 Business Central: Is there an easy way to check if a standard/base object has been extended? (Extended object list)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to briefly share a mini tip I just saw on X (formerly Twitter), is there an easy way to check if a standard/base object has been extended?
More details: Mr. Bojan L. has given the answer.šŸ‘

Extensions are a programming model where functionality is defined as an addition to existing objects and defines how theyā€™re different or modify the behavior of the solution. In addition to first-party extensions, there may also be third-party extensions in the environment, including AppSource Extensions or PTE.

Therefore, sometimes it is important to determine whether the function currently being used is a standard function and whether it has been extended.
First, you can use the Page Inspection feature.
You start page inspection from the Help & Support page. Choose the question mark in the top right corner, choose Help & Support, and then choose Inspect pages and data. Or, you can just use the keyboard shortcut Ctrl+Alt+F1. More details: Inspecting pages in Business Central

TheĀ ExtensionsĀ tab displays installed extensions that affect the selected page or its source table.
There are four different extension types:

  • Adds pageĀ indicates that the extension adds the page object.
  • Extends pageĀ indicates that the extension modifies the page, like adding a field, action, or code. In AL, these modifications are done by a page extension object.
  • Adds tableĀ indicates that the extension adds the table object.
  • Extends tableĀ indicates that the extension modifies the source table, like adding a field or code. In AL, these modifications are specified by a table extension object.

More details: What Page Inspection Shows

But this method has some limitations, for example, it can only be used on pages, and is not works for reports.

And we cannot export the list. So we need another way.
PS: Extension objects overview

Object typeDescription
Table extensionAdd fields to an existing table.
Page extensionAdd fields, actions, and layout to an existing page.
Report extensionAdd data items, columns, request pages, and layouts to an existing report.
Enum extensionAdd new values to an existing enumeration.
Permission set extensionAdd new permissions to an existing permission set.

We mentioned this method when discussing Dynamics 365 Business Central: View the all object details (Type, ID, Nameā€¦) and find out what extension an object belong to without using VS Code, but the purpose is different.
page 9174 ā€œAll Objects with Captionā€:

You can force Business Central to run theĀ ā€œAll Objects with Captionā€Ā page by adding theĀ ?page=9174Ā parameter to the URL, such as in the following example:Ā 
https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox?page=9174

Or open it from Tell me.

When the Object Type is Extension objects, the id of the standard/base object will be displayed in the Object Subtype field. For example, ReportExtension

In the extension:

Letā€™s look at another example. Page Extensions that extend Customer Ledger Entries (25, List)

Very simple. We can also make a small tool to display the original object name and type.

Object typeExtend Object type
Table extensionTable
Page extensionPage
Report extensionReport
Enum extensionEnum
Permission set extensionPermissionSet

Looks good.

Give it a try!!!šŸ˜

PS:
1. Dynamics 365 Business Central: Can we uninstall Microsoft (First-party) extensions and how to install them back?

2. Dynamics 365 Business Central: Find out which extension the field belongs to

Source code: Github

pageextension 50122 AllObjectswithCaptionExt extends "All Objects with Caption"
{
    layout
    {
        addafter("Object Subtype")
        {
            field(ExtendObjectType; ExtendObjectType)
            {
                ApplicationArea = All;
                Caption = 'Extend Object Type';
            }
            field(ExtendObjectName; ExtendObjectName)
            {
                ApplicationArea = All;
                Caption = 'Extend Object Name';
            }
        }
    }

    var
        ExtendObjectType: Text[30];
        ExtendObjectName: Text[30];

    trigger OnAfterGetRecord()
    begin
        ExtendObjectType := '';
        ExtendObjectName := '';
        case Rec."Object Type" of
            Rec."Object Type"::"TableExtension":
                begin
                    ExtendObjectType := 'Table';
                    ExtendObjectName := GetObjectNameFromID(Rec."Object Type"::Table, Rec."Object Subtype")
                end;
            Rec."Object Type"::"PageExtension":
                begin
                    ExtendObjectType := 'Page';
                    ExtendObjectName := GetObjectNameFromID(Rec."Object Type"::Page, Rec."Object Subtype")
                end;
            Rec."Object Type"::ReportExtension:
                begin
                    ExtendObjectType := 'Report';
                    ExtendObjectName := GetObjectNameFromID(Rec."Object Type"::Report, Rec."Object Subtype")
                end;
            Rec."Object Type"::EnumExtension:
                begin
                    ExtendObjectType := 'Enum';
                    ExtendObjectName := GetObjectNameFromID(Rec."Object Type"::Enum, Rec."Object Subtype")
                end;
            Rec."Object Type"::PermissionSetExtension:
                begin
                    ExtendObjectType := 'PermissionSet';
                    ExtendObjectName := GetObjectNameFromID(Rec."Object Type"::PermissionSet, Rec."Object Subtype")
                end;
        end;
    end;

    local procedure GetObjectNameFromID("Object Type": option; "Object ID": Text[30]): Text[30]
    var
        AllObjWithCaption: Record AllObjWithCaption;
    begin
        if AllObjWithCaption.Get("Object Type", "Object ID") then
            exit(AllObjWithCaption."Object Name");
    end;
}

END

Hope this will help.

Thanks for reading.

ZHU

ć‚³ćƒ”ćƒ³ćƒˆ

Copied title and URL