SBX - Search With Button

SBX - Forum Post Title

Is there an out of OOTB functionality in D365 portal to change theme on button click by user?

Microsoft Dynamics CRM Forum

harsh ranjan asked a question on 9 Jan 2019 11:17 PM

Question Status

Suggested Answer

We are trying to implement a fucntionality wherein we need to update UI elements on portal based on division selected by the user. Can we achieve this OOTB

Thanks,

Harsh

Reply
Tom Northrup responded on 10 Jan 2019 2:05 AM
My Badges
Suggested Answer

Hi Harsh, thanks for reaching out.

Without getting into discovery here, below is one solution. Please provide more requirements if this doesn't make sense.

In Portal themes are set by page or page templates. Your ask is based on button click for division. If I had several pages under each division I would create a division template and apply that to all those child division pages. The template can apply CSS for you.

I am assuming you do not want to change the whole site after they have clicked division. That would feel awkward to me if a site completely changed theme. Look of a site is tied to user trust, changing colors can decrease engagement. Keep it simple!

Reply
harsh ranjan responded on 10 Jan 2019 4:28 AM

Hi Tom,

Thanks for the quick reply. We need to dynamically change color of some elements based on division selection. Once the page is loaded, we wont reload it on button click, just change css for some elements, can we achieve this using multiple templates? As a work around, we are using jquery to achieve this and exploring other approaches as well.

Regards

Harsh

Reply
Tom Northrup responded on 13 Jan 2019 7:26 AM
My Badges
Suggested Answer

Sorry, but without reloading the page and changing the template/page that loads then using jQuery is the only way. You may already be doing this, but you can put that jQuery on the page or template so at least managing it is simple enough. Remember to use comments to keep some version control of your script's since your pasting the script into a text box.

Please let us know if you do find an alternative solution.

Reply
Tom Northrup responded on 10 Jan 2019 2:05 AM
My Badges
Suggested Answer

Hi Harsh, thanks for reaching out.

Without getting into discovery here, below is one solution. Please provide more requirements if this doesn't make sense.

In Portal themes are set by page or page templates. Your ask is based on button click for division. If I had several pages under each division I would create a division template and apply that to all those child division pages. The template can apply CSS for you.

I am assuming you do not want to change the whole site after they have clicked division. That would feel awkward to me if a site completely changed theme. Look of a site is tied to user trust, changing colors can decrease engagement. Keep it simple!

Reply
Tom Northrup responded on 13 Jan 2019 7:26 AM
My Badges
Suggested Answer

Sorry, but without reloading the page and changing the template/page that loads then using jQuery is the only way. You may already be doing this, but you can put that jQuery on the page or template so at least managing it is simple enough. Remember to use comments to keep some version control of your script's since your pasting the script into a text box.

Please let us know if you do find an alternative solution.

Reply

SBX - Two Col Forum

SBX - Migrated JS