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)

Is it possible to create tooltips for option set values with custom code?

(0) ShareShare
ReportReport
Posted on by 7

I know this isn't native functionality, but would it be possible to add tooltips for option set values through javascript or C# plugins?

All of the older posts I've seen have all said this isn't possible, but don't explore how to go about this through custom code. The closest thing I could find was this forum post which shows how to add tooltips to fields before it was implemented in CRM, but I'm still unsure how I would reference the specific option set values.

I'm not asking for fully fleshed out code, but if someone has any guidance on something I could try, I would greatly appreciate it.

Thanks!

*This post is locked for comments

I have the same question (0)
  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    As you have already identified, there is no standard/ supported way to achieve this. You can however try below unsupported code and see if it works for you.

    You need to change the below script as per your environment, fields, option set. You also need to register UpdateTooltip on form load

    ======================

    var ownerShipCodeTooltip = [
        { value: "1", tooltip: "Select 'Public' for Public owned companies" },
        { value: "2", tooltip: "Select 'Private' for Privately owned companies" },
        { value: "3", tooltip: "Select 'Subsidiary' for subsidiaries" },
        { value: "4", tooltip: "If you are unsure, select 'Other'" }
    ];

    function UpdateTooltip() {
        try {
            window.parent.$("#ownershipcode_i option").each(function (i) {
                var currentValue = $(this).val();
                if (currentValue != "") {
                    $(this).attr("title", ownerShipCodeTooltip[currentValue].tooltip);
                }
            });
        }
        catch (err) {
            console.log("Error in UpdateTooltip" + err.message);
        }
    }

    ======================

    tootltip.png

    ** It is advisable to instead of using the unsupported code, try convince your client or modify the requirements to use supported way as this may not work in all the upcoming versions or update.

    Hope this helps.

  • abauder Profile Picture
    7 on at

    Thanks for the help, but this didn't work when I tried it. I'm going to try and get the requirements changed hopefully.

  • GRedhead Profile Picture
    270 on at

    Hi, i have this same requirement, i have tried this and it does not work do you have an updated script?

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    You can explore the option to create Custom PCF control to achieve your requirement.

    Also check below gallery for any existing PCF already created by community member.

    https://pcf.gallery/

    If found helpful, Please mark my answer verified.

  • Suggested answer
    Fedorov Profile Picture
    40 on at

    Hello, I made a solution for this that might work for you.

    See:

    community.dynamics.com/.../1134819

  • snoek Profile Picture
    18 on at
    Did you ever find success with any of the options below? Currently trying the javascript option, but am having errors.

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