You need to sign in to do that
Don't have an account?

How to prevent double click on a custom Detail Page Button?
I have account Detail Page custom button and Content Source is visual force page in the Button Setup.
VF page is used to call a controller method to execute and create Record in ERP system using REST API.
<apex:page standardcontroller="Account" extensions="CreateCustomerController" action="{!createCustomer}">
</apex:page>
When user double clicks it is creating duplicate customer records in our ERP system.
How can I prevent this happening.?
Can I disable the button after first click?
If you have asome other solution I can try. I have seen some post like below but I am using VF page as content source so don't want use this.
https://developer.salesforce.com/forums/?id=906F000000093GUIAY
VF page is used to call a controller method to execute and create Record in ERP system using REST API.
<apex:page standardcontroller="Account" extensions="CreateCustomerController" action="{!createCustomer}">
</apex:page>
When user double clicks it is creating duplicate customer records in our ERP system.
How can I prevent this happening.?
Can I disable the button after first click?
If you have asome other solution I can try. I have seen some post like below but I am using VF page as content source so don't want use this.
https://developer.salesforce.com/forums/?id=906F000000093GUIAY
You can use Status as well, which will show a loding UI but I don't think it will prevent clicking the link again. In general practice we use YUI Loading which again shows a loding UI but disable the complete background page, that will probably prevent the double click on link.
Hope this will help as an example : https://developer.salesforce.com/page/Visualforce_blog