Activity Forums Salesforce® Discussions What is the use of Onclick attribute in Salesforce?

  • Deepak

    Member
    March 5, 2020 at 4:09 pm

    Hi,

    <apex:commandbutton action="{!delete}" value="Delete" immediate="true" onclick="dislayErr()"/>

    function displayErr(){
    if({!Account.name != 'Test User'}){
    alert("You are not allowed to delete this credit card entry");
    }
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos