web
You’re offline. This is a read only version of the page.
close
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...
Suggested Answer

Extension in Business Central

(0) ShareShare
ReportReport
Posted on by 2,100

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,005 Super User 2025 Season 2 on at

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

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 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
    95,599 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,785

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,007 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 948 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans