Activity Forums Salesforce® Discussions How can we disable the command button after first click?

  • How can we disable the command button after first click?

    Posted by Mohit on September 2, 2016 at 1:14 PM

    Hi All,

    How can we disable the command button after first click so that double click can we avoided?

    I am in scenario in which I want to disable the command button after first click untill it don't perform it is operation so that double clicking of button can we avoided.

    Please give suggestions.

     

    Charan Tej replied 8 years ago 3 Members · 2 Replies
  • 2 Replies
  • Surbhi

    Member
    September 6, 2016 at 1:26 PM

    Hi Mohit,

    You can use a JavaScript function for disabling the custom button. This function will run with "onclick" event of the button.

    Thanks

  • Charan Tej

    Member
    January 3, 2018 at 10:44 AM

    onclick="this.style.display='none';"

    This will remove the button once clicked.

    onclick="this.disabled=true;"

    This will disable the button once clicked.

    Let me know if this doesnt work.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos