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

How to execute command button twice by one click ?
HI,
Actually I'm trying to ceate a record in external system for that I have developed
a REST api and it works perfectly for creating a record.
Problem:
---------
Step1 : By clicking the command button once in visualforce page first it sends request to external
system and returns the response as status ok.But no record creates in external system this time.
Step2 : Now this time by clicking the command button twice from visualforce page it sends request to third party
and creates a record in external system.
How can I avoid double clicking a command button in visualforce for creating a record.
This is my page :
-----------------
<apex:page standardController="Test__c" extensions="UserExport" sidebar="false">
<apex:form >
<apex:panelGrid columns="2">
<apex:pageBlock Title=" Registration Form">
<apex:pagemessages />
<apex:pageBlockSection >
<apex:inputField value="{!Test__c.First_Name__c}" /> <br/>
<apex:inputField value="{!Test__c.Last_Name__c}" /><br/>
<apex:inputField value="{!Test__c.Login__c}" /><br/>
<apex:inputField value="{!Test__c.Registration_Password__c}" /><br/>
<apex:inputField value="{!Test__c.Conform_Password__c}" /><br/>
<apex:inputField value="{!Test__c.Company_Name__c}" /><br/>
<apex:inputField value="{!Test__c.City__c}"/> <br/>
<apex:inputField value="{!Test__c.State__c}"/><br/>
<apex:inputField value="{!Test__c.Country__c}"/><br/>
<apex:inputField value="{!Test__c.Mobile_Phone__c}"/> <br/>
</apex:pageBlockSection>
<apex:commandButton value="Register" action="{!processButtonClick}"/>
</apex:pageBlock>
Thanks,
Actually I'm trying to ceate a record in external system for that I have developed
a REST api and it works perfectly for creating a record.
Problem:
---------
Step1 : By clicking the command button once in visualforce page first it sends request to external
system and returns the response as status ok.But no record creates in external system this time.
Step2 : Now this time by clicking the command button twice from visualforce page it sends request to third party
and creates a record in external system.
How can I avoid double clicking a command button in visualforce for creating a record.
This is my page :
-----------------
<apex:page standardController="Test__c" extensions="UserExport" sidebar="false">
<apex:form >
<apex:panelGrid columns="2">
<apex:pageBlock Title=" Registration Form">
<apex:pagemessages />
<apex:pageBlockSection >
<apex:inputField value="{!Test__c.First_Name__c}" /> <br/>
<apex:inputField value="{!Test__c.Last_Name__c}" /><br/>
<apex:inputField value="{!Test__c.Login__c}" /><br/>
<apex:inputField value="{!Test__c.Registration_Password__c}" /><br/>
<apex:inputField value="{!Test__c.Conform_Password__c}" /><br/>
<apex:inputField value="{!Test__c.Company_Name__c}" /><br/>
<apex:inputField value="{!Test__c.City__c}"/> <br/>
<apex:inputField value="{!Test__c.State__c}"/><br/>
<apex:inputField value="{!Test__c.Country__c}"/><br/>
<apex:inputField value="{!Test__c.Mobile_Phone__c}"/> <br/>
</apex:pageBlockSection>
<apex:commandButton value="Register" action="{!processButtonClick}"/>
</apex:pageBlock>
Thanks,
Thanks,
Ishwar Shinde
Thanks,
Ishwar Shinde
P.S. : Mark this as best ans if this helps.