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)

How to change the color of buttons in portals

(0) ShareShare
ReportReport
Posted on by 250

Hello everyone my name is Taniguchi and i would like to know how can i change the color of the buttons and how can i go to another page when i click send in the form

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can change color of the button using JQuery or CSS, for example if you want to change it using Jquery you can use

    $('#InsertButton').css("background-color", "blue");  //here insertbutton is the id of the button.

    To send it to another page you can use

    window.location.href = "/support"; //here we are redirecting user to support page.

    Let me know if you need any help.

  • TaniSantos Profile Picture
    250 on at

    How can i know the name of the button, is it the name in the lable ?

  • Suggested answer
    Srikanta Mahapatro Profile Picture
    190 on at

    Hi  Taniguchi,

    To change the button color of the custom portal, login in portal with a contact with administration role

    Open the particular page where the button is present

    In content editor click the "Edit" button to open the page and add the below code mentioned in screenshot

    buttonGrid.PNG

    clear the cache and your button color will be changed

    buttonGrid.PNG

    Thanks,
    Srikanta

    If found useful, please mark the answer as verified

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi Taniguchi,

    You can write click on the button and can use inspect to know id of the button, this is not display name.

    Let us know if you need more help.

  • TaniSantos Profile Picture
    250 on at

    the code Works but changed the color of two buttons, probaly because they are in the same class, how can i change the color for the button i want ?

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Can you share your code, as said you need to use id of specific button or some other property to select that particular button only, instead of use class as that can be referred by others as well.

  • Suggested answer
    Srikanta Mahapatro Profile Picture
    190 on at

    Hi Taniguchi,

    You can inspect and get the particular class name of that button and write like below

    .btn-primary.create-action {
    
       color: #fff;
    
       background-color: #ff0000;
    
       border-color: #ff0000;
    
    }

    Hope it helps !!!

    Thanks,
    Srikanta

    If found useful, please mark the answer as verified

  • TaniSantos Profile Picture
    250 on at

    8422.code.png

    8422.code.png

    Here is my code and inspect how can i see the id and put in my code ?

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    As your button don't have id, try to select button using data attribute like below

    $('[data-filtercriteriaid="USE id"]').css("background-color", "blue"); //replace USE id from the id of the highlighted area, you can also use any text attribute which you can set from the workflow button setting in the page.

  • Suggested answer
    Srikanta Mahapatro Profile Picture
    190 on at

    Hi,

    Use the below code to make it work, As I saw your inspect, the ID might not help as its a GUID and may change

    .workflow-link.btn-default
    
    {
    
      color: #fff;
    
      background-color: #ff0000;
    
      border-color: #ff0000;
    
    }


    Thanks,

    Srikanta

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