Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

AFFECTING DEVELOPMENT CHANGES TO ONLY 1 COMPANY

Posted on by 3
I am a business central developer. I need to customize pages and tables in business central. In the business central environment, there are 10 companies. I only need to customize pages of 1 company in that environment without affecting the other companies. How is it possible to achieve this?
 
I will highly appreciate your responses.
Categories:
  • Suggested answer
    AFFECTING DEVELOPMENT CHANGES TO ONLY 1 COMPANY

    Customizing pages and tables for a specific company without affecting others can be achieved through company-specific customizations. Here's how you can approach this:

    1. Use Company-Specific Page Customizations:
      Business Central allows you to create company-specific customizations for pages. When you customize a page, you can specify which company the customization applies to.
    2. Utilize the Customization Mode:
      • Open the company you want to customize in Business Central.
      • Enter the customization mode (gear icon > Customize).
      • Make your desired changes to the page.
      • When saving, ensure you select to save the customization for the current company only.
    3. Implement Conditional Logic:
      You can use AL code to implement company-specific logic:
             if CompanyName = 'Your Specific Company' then
             {
                          // Logic here
              }
    4. Use Configuration Packages:
    Create a configuration package that includes your customizations and apply it only to the specific company.
     
    5. Leverage Permission Sets:
    Create a permission set that allows access to your customizations and assign it only to users in the specific company.
     
    6. Use Company-Specific Extensions:
    Develop an extension that checks the company name and only applies changes for the specific company.
     
    7. Employ Table Extensions with Company Filters:
    When extending tables, you can add filters based on the company name.
     
    Please let me know if you require more clarification on this.
  • YUN ZHU Profile Picture
    YUN ZHU 64,449 Super User on at
    AFFECTING DEVELOPMENT CHANGES TO ONLY 1 COMPANY
    I agree with Valentin. You should create a settings table, for example, with User ID, Page ID, and Enable fields.
    Then add logic to the OnOpenPage trigger of your page. If there is no setting here or Enable is not true, prompt the user that he does not have permission to open it.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Valentin Castravet Profile Picture
    Valentin Castravet 7,994 Super User on at
    AFFECTING DEVELOPMENT CHANGES TO ONLY 1 COMPANY
    This is usually done by creating some sort of setup that actives or makes the customization active. For example, if you're customizing something in the sales order page, create a boolean in the Sales & Receivables Page that turns on that customization. This way you can select to turn it on in a specific company. This should give you some ideas. Personally I wouldn't hardcode the company name in your code though. 
     
  • gdrenteria Profile Picture
    gdrenteria 5,251 Super User on at
    AFFECTING DEVELOPMENT CHANGES TO ONLY 1 COMPANY
    Hi
    The objects affect all companies, you could either create a different object and by code enable or display it depending on the company.
    This function could help you. I hope it helps you, let's hope that other experts can also provide their point of view.
    BR
    GR

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,513 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans