Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
Posted on by 5

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

  • snoek Profile Picture
    snoek 28 on at
    Is it possible to create tooltips for option set values with custom code?
    Did you ever find success with any of the options below? Currently trying the javascript option, but am having errors.
  • Suggested answer
    Fedorov Profile Picture
    Fedorov 338 on at
    RE: Is it possible to create tooltips for option set values with custom code?

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

    See:

    community.dynamics.com/.../1134819

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Is it possible to create tooltips for option set values with custom code?

    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.

  • GRedhead Profile Picture
    GRedhead 270 on at
    RE: Is it possible to create tooltips for option set values with custom code?

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

  • abauder Profile Picture
    abauder 5 on at
    RE: Is it possible to create tooltips for option set values with custom code?

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

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Is it possible to create tooltips for option set values with custom code?

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans