Personalized Community is here!
Quickly customize your community to find the content you seek.
Latest TechTalk Videos
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
At this point I’m 99% sure almost all of us have been asked the “can we change the theme color to the one of our company/brand?” question. While this is unfortunately not possible what we can do is defining a different theme for each company.
This is just a proof of concept. I still haven’t managed to successfully change the theme when the DataArea is changed using the company list.
By default each user sets his desired theme in the user settings:
If you check the SysUserInfo table you’ll find the enum Theme field, its type is SysUserInfoTheme. This enum is not extensible and this is one of the reasons we cannot add new colors (the other is the class which handles the themes being not accessible).
The customer might ask us to set a fixed different color/theme for different companies. To be sure that the users don’t misidentify different companies or even environments.
For this example I’ve decided to add an override on the Legal Entities form and set the new theme to be used there.
Add a new SysUserInfoTheme enum field to the CompanyInfo table:
Then add the field to the OMLegalEntity form:
We now have a list of the available themes. Let’s add the functionality.
If we do a metadata search of the SysUserInfo Theme field we’ll find it’s being used by the SysFormUtil class in the GetThemeDensityForCurrentUser. We’ll extend this method in the following way:
By returning our field’s value we make the system select the value from the CompanyInfo table instead of the one defined by the user. For example:
Different companies, different themes!
Now I only need to find a way to make this work when changing companies. I’ve tried with the lookup form which shows the available companies with no luck. Any ideas?
La entrada Override the default theme per company (proof of concept) se publicó primero en ariste.info.
Business Applications communities