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)

Change command button tooltip in Javascript

(0) ShareShare
ReportReport
Posted on by

Hello,

I am using the Ribbon Workbench and my initial goal is to prevent someone from closing an opportunity as won or lost until they enter a value on the form.

Changing the command value of the button itself in the workbench does not seem like a viable option. My logic works, but I can't seem to get the Close as Won event to cancel if I want it to. I put return false; in the JS file if the value was not present, but it did not stop the Close window from popping up.

So the other option I am currently evaluating is an enable action. I.E., Disable those buttons if the field does not currently have a value, otherwise enable. The problem is, the reason behind the buttons being disabled is not clear to the user. I'd like to put some hover text on it.

Is it possible to change the tooltip for the Close as Won/Lost buttons on the fly in a Javascript form OnLoad? I'm aware that this setting can be changed in the workbench but I need to do it in Javascript. Ideally on load, I will change the tooltip to my custom sentence(s) if the button are disabled; otherwise, I want the tooltip to be the default message.

Additionally, if you have a way better idea for accomplishing my objective, do let me know...

Thank you,

Paul

*This post is locked for comments

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

    Assuming you are using CRM version <2013, because in/or after 2013 disabled buttons are not rendered at all. You can do a workaround and setup another button for Close as Won/Lost and there put your tool tip text for disable buttons, and use disable icons as well. Now instead of disable hide/show your original buttons based on value logic.

    So idea is when your main button will be hidden show these buttons with custom tooltip and disable picture, and based on the value hide them and show your original buttons.

    Thanks

  • Community Member Profile Picture
    on at

    Sorry for not telling you this in my post, but I am using CRM 2015.

    Will the above solution work for CRM 2015?

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

    Yes, it will work.

    Thanks

  • Community Member Profile Picture
    on at

    One more question. Since we are creating a new button and just giving it a disabled look, doesn't that mean that users will still be able to click it? Since we're just changing the button icon. How do we make it unclickable? Since apparently disabling it means it will not show up?

    Thanks.

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

    Do write anything on the button, so even if they will click it won't response.

    Thanks

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