web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Append red color asterisk to web resource label

(0) ShareShare
ReportReport
Posted on by 505

Hi Experts,

I have a web resource label.

I need to append red color asterisk to it, to mark it as a required field.

how can I accomplish this?

I have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can use something like following:

    *

  • cloflyMao Profile Picture
    25,210 on at

    Hi Priyank,

    You could do it with unsupported way:

    The process is below:

    select web resouce label element by its data attribute -> create a style node -> fill the node with custom CSS rules -> append the tag to the DOM.

    1. Get a data attribute value by inspector:

    pastedimage1587436949525v1.png

    2. Make the label visible

    pastedimage1587437140032v2.png

    3. Execute function below at form OnLoad event.

    function createStyle() {
        var customStyle = '[data-id="WebResource_All_Records-WebResource_All_Records_label"]:after {';
        customStyle  = 'content: "\\002A"; display: inline-block; width: 20px; height: 20px; color: red; text-align: center }';
        var css = document.createElement('style');
        css.type = 'text/css';
        css.innerHTML = customStyle;
        parent.document.head.appendChild(css);
    }

    Result: a red color asterisk has been appended to the label

    pastedimage1587437632668v4.png

    How does it work:

    ::after selector will insert some text after the content of selected element,

    so we created an inline-block element which contains asterisk symbol,

    in HTML, css code for asterisk is "\002A".

    When opening inspector again, we can find an extra element was inserted after label element.

    pastedimage1587437968021v5.png

    At same time, a style node was appended to head tag:

    pastedimage1587438127286v7.png

    Regards,

    Clofly

  • cloflyMao Profile Picture
    25,210 on at

    Hi Priyank,

    Is it working for you?

    Regards,

    Clofly

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans