+ Start a Discussion
Jyosi jyosiJyosi jyosi 

pulling the update values into visualforce page after updating the records

Hello Every ,

I have visualforce ,with the two button verify and submit.
When user clicks verify button .I insert the records and make a callout to thirdparty.
I get the response where i update the fields.but the updated fields are not reflected in visualforce page( Like i wont be closing the page)
Here is code for the button .

<apex:form id="form">
        <apex:pageBlock mode="edit" id="pgBlckId">
            <apex:pageblockbuttons >
            <apex:commandButton value="Save As Draft " action="{!saveSample}"  reRender="pgBlckId" status="actStatusId"/>
             <apex:commandButton value="Verify" action="{!saveSample}" oncomplete="executeWS()"   reRender="pgBlckId" status="actStatusId"/>
             <apex:actionStatus id="actStatusId" rendered="true">
             <apex:facet name="start" >
                  <apex:actionFunction name="executeWS" action="{!executeWS}"  >
                  <div class="waitingSearchDiv" id="el_loading" style="background-color: #fbfbfb;
                       height: 100%;opacity:0.65;width:100%;"> 
                    <div class="waitingHolder" style="top: 74.2px; width: 91px;">
                        <img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
                        <span class="waitingDescription">Please Wait...</span>
the excute method

public PageReference executeWS(){
       system.debug('executeWS === '+SAPOrderNumber.get(sampleRecord.Id)+'==='+this.j);
            /*PageReference pageref = new pagereference('/apex/sampleorderecc');
      pageref.getParameters().put('recordID', samplerecord.Id);
         }catch(Exception e)
           system.debug('Exception === '+e.getMessage()); 
        return Null;

public void processSampleOrderRequestCreate(SampleOrderECC1 obj,Id sampleRecord)
      here i make callout to thirdparty 

 public void processCreateResponse{
  here i updated the records.


thanks for the ehlp
Raj VakatiRaj Vakati
Hi ,
What you can do it you can combine both the actions into a single action. Merge action and oncomplete into one action.
You can Change "oncomplete" to OnCLick ( Not sure this will work )

Thanks ,