Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Extension Visibility Issue in Business Central

(1) ShareShare
ReportReport
Posted on by 48
I have three companies in the business central production environment. I have been assigned to add some additional features in Company 1. I have made an extension for Company 1. The changes caused by the extension made for Company 1 must not be seen in either Company 2 or Company 3.

However, when I upload the extension file, the changes made in Company 1 show up in Company 2 and Company 3. 

Can anyone help me make the extension I made visible only in Company One and not in the other two companies? I am a newbie, so please guide me through this if possible.

(For Example, the extension I have created will create two new fields in the sales order page, which is necessary for company 1 but not needed for company 2 and company 3, so I don't want the two fields created using the extension for company 1 to show up in company 2 and company 3)
  • Verified answer
    YUN ZHU Profile Picture
    78,675 Super User 2025 Season 1 on at
    Extension Visibility Issue in Business Central
    Just adding some information.
    Dynamics 365 Business Central: Dynamic Visibility of Controls (Hide and show fields dynamically)
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    gdrenteria Profile Picture
    15,252 Most Valuable Professional on at
    Extension Visibility Issue in Business Central
    Hi
    What our colleagues have said about the impact on all companies is correct. Why Extension Installation Applies to All Companies in the Same Database in Microsoft Dynamics 365 Business Central
    You could also use the following link to set some business rules for one company or another.
    Best
    GR
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    9,299 Super User 2025 Season 1 on at
    Extension Visibility Issue in Business Central
    Please try using the code provided below. Remember to change the company name based on the name in your production account.
     
     
    pageextension 50704 "Sales Order Subform Ext" extends "Sales Order"
    {
        layout
        {
            addafter(General)
            {
                group("Lease")
                {
                    ShowCaption = false;
                    Visible = isVisible;
     
                    field("Lease Status"; Rec."Lease Status")
                    {
                        ApplicationArea = All;
                        Caption = 'Lease Status';
                    }
     
                    field("Lease Amount"; Rec."Lease Amount")
                    {
                        ApplicationArea = All;
                        Caption = 'Lease Amount';
                    }
                }
            }
        }
        trigger OnOpenPage()
        begin
            if companyInformation.Get() then
                case companyinformation.Name of
                    'CRONUS IN': //Company 1 name
                        isVisible := true;
                    'My Company'://Company 2 name
                        isVisible := false;
                    'My Company US'://Company 3 name
                        isVisible := false;
                end;
        end;
     
        var
            isVisible: Boolean;
            companyinformation: Record "Company Information";
    }
  • Suggested answer
    Mohana Yadav Profile Picture
    60,195 Super User 2025 Season 1 on at
    Extension Visibility Issue in Business Central
    You can add a boolean in ex: company information page and add the condition in all the code changes to execute the code only if that boolean is enabled.
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    9,299 Super User 2025 Season 1 on at
    Extension Visibility Issue in Business Central

    Hello, You cannot set an extension for a specific company . Its per database.

    We can use the DataPerCompany property in a table to specify that the data will only be visible within a specific company. However, this property applies solely to the table itself.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-datapercompany-propert

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans