web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Extension in Business Central

(0) ShareShare
ReportReport
Posted on by 2,102

Hii,

How to install extension in one company of same Environment which has two company.

Thank you.

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,184 Super User 2026 Season 1 on at

    We cannot. The app installed will execute in all companies.

  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Hi,

    Extension works through all the company in the same environment, but yes if you are intent to run any specific code in specific company you can use the method CHANGECOMPANY in your code, see below for more hints.

    learn.microsoft.com/.../record-changecompany-method

  • Suggested answer
    YUN ZHU Profile Picture
    98,231 Super User 2026 Season 1 on at

    Hi, because of this, developers generally add settings pages to their extensions, which are only valid when the function is enabled.

    Thanks.

    ZHU

  • Jakob Gutzmann Profile Picture
    18 on at

    Hi,
    as others have said, extensions are installed for all companies within the same environment.

    If you have small blocks of code that should be executed in a company-specific way, you can nest them in an if-clause and check for the current company with 

    Database.CompanyName
    But I wouldn't suggest that for entire pages/tables, only small company-specific code blocks.
    Thanks,
    Jakob Gutzmann
  • MetaKa Profile Picture
    on at

    As YunZhu stated, the correct aproach is to make a setup page (card) for the extension where u can activate or deactivate the functionallity per company with a boolean and a procedure to get the enabled state from, in every place that is needed put a:

    if not enabled() then exit;

    and end the functionallity based on the configuration.

    The extension will be installed in all the companies, but the functionallities/pages will have a validation checking if its activated, this way

    ↑ This is the correct aproach in 95% ~100% of cases

    The other 5% could be a personalization extension where specifically u just need 1 functionalitty on 1 company, so u do the if getting the company.

    But even in this case i would go with a setup page, for the posibility of new companies in the future.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,960 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,084 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,047 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans