Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

AFFECTING DEVELOPMENT CHANGES TO ONLY 1 COMPANY

Posted on by 5
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.
  • Verified 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 73,696 Super User 2024 Season 2 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 24,822 Super User 2024 Season 2 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 12,183 Most Valuable Professional 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans