You need to sign in to do that
Don't have an account?
Akshata Shah
Prevent Second click on custom buttom
Hello Friends,
I have custom button on custom object.
custom object calls VF page and controller.
How i can prevent second click on custom button using checkbox(true or false)
On second it should display error message like
"Cant click for second time".
Pleas help me!
Thank you
Akshata
I have custom button on custom object.
custom object calls VF page and controller.
How i can prevent second click on custom button using checkbox(true or false)
On second it should display error message like
"Cant click for second time".
Pleas help me!
Thank you
Akshata
I found in the apex:commandButton tag developer documentation that there is something called as ondblclick this calls the function when the button is clicked twice, one possibility is to show an alert message when ondblclick fires.
>> the above is persent in the link- [ https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_commandButton.htm ]
I hope this as helpful in your implementation and in case if it helped can you please choose this as the best answer so that it can be used by others in the future.
Regards,
Anutej
We are talking about a custom button which opens a Vf page and is placed on a custom object's layout, is that right? In that case I'm afraid you cannot add any logic to it. You will have to modify the VF page to check for the checkbox.
You can use rerender to decide if and when the js script is supposed to run (Example (https://salesforce.stackexchange.com/questions/100157/call-javascript-function-from-apex-method))
I have try this code
But still not working
Please tell me where am wrong?
Reply me!
Regards,
Akshata