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 :
Microsoft Dynamics CRM (Archived)

CSS script does not change the appearance of CRM

(0) ShareShare
ReportReport
Posted on by

Hello,

I created simple css script (i am sure that works, it only sets bacground color on some div-s) new_custom.css .

4810.Untitled.png

css is in Webresources. I call it with Javascript on load:

Whenever account is loadet style should be also difrent.

0601.Untitled1.png 

function LdCSS() {
var path="/WebResources/new_Acustom.css";
var head = document.getElementsByTagName('head')[0];
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = path;
link.media = 'all';
head.appendChild(link);
}
Intersting is if I paste this script on console (chrome developer mode). style works and divs backgrounds are colored.

I tried all i could think off but nothing works.

Thank you for all the answers.
Luka Kadunc


*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I followed this step-by-step

    www.codeproject.com/.../improve-user-experience-by-styling-and-coloring-mi

  • Suggested answer
    Mohd Tahir Profile Picture
    676 on at

    Hi SomenewGuy,

    It is important to note the last point of article you have shared, i.e.

    'Points of Interest':

    Article says : "This solution working fine with on-premises dynamic CRM only. Unfortunatly it is not working with CRM online."

    So in your case as you are using Dynamics CRM online, this styling won't work.

    If this helped you, please mark the answer as verified.

  • Community Member Profile Picture
    on at

    Oh didnt see that.

    Do you mybe know some easy way to use styling in CRM online?

    Thank you for fast replay.

  • Suggested answer
    Mohd Tahir Profile Picture
    676 on at

    Unfortunately this type of customization isn't supported by Microsoft since Microsoft Dynamics CRM 2015 update version. If you still wish to manipulate DOM elements, refer this :

    Still it isn't recommended as code might stop working with future updates.

  • Community Member Profile Picture
    on at

    Ok, i tried same step-by-step on-premises dynamic CRM and same problem style doenst change onLoad event.

    And if I copy script in console style changes. i am realy out of ideas what could be wrong.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans