Apex Continuation is causing "Unable to restore input value state - state value missing for component..."

This happens when a continuation callout is made on the action call of a command Button and conditionally a part of a VF page is refreshed. I can provide more details around this if required.

We are trying to invoke the method simulate() on a button click in a VF page.

Here is the code:

// response variables (of stub generated wrapper class types)
public SalesProcessingResponse.SalesOrderSimulateResponse_SyncFuture simulateResponse = new SalesProcessingResponse.SalesOrderSimulateResponse_SyncFuture();
public SalesProcessingResponse.SalesOrderSimulateResponse_Sync result = new SalesProcessingResponse.SalesOrderSimulateResponse_Sync();

//action method
public continuation simulate(){
    /**** custom Validations
    ------ ***/
    Integer TIMEOUT_INT_SECS = 60;  
    Continuation cont = new Continuation(TIMEOUT_INT_SECS);
    cont.continuationMethod = 'processSimulateResponse';
    //request variable - WSDL generated wrapper class type
    SalesProcessingRequest.SalesOrderSimulateRequest_Sync inputrequest = new SalesProcessingRequest.SalesOrderSimulateRequest_Sync();
    //Utility method - returns the request populated as per the need
    inputrequest = requestService.returnOrderSimulateRequest(acct, currentOrder,lstOlItems);
    simulateResponse = service.beginSalesOrderSimulate(cont, inputrequest);
    return cont;   
public Object processSimulateResponse(){    
       result = simulateResponse.getValue();
       system.debug('**** result'+result);
       // Return null to re-render the original Visualforce page
       return null; 

Could anyone please let me know if there's a workaround for this?

Thanks, Sirisha Kodi

  • usually, if there is a workaround it'll be included in the issue... It doesn't look like there is one. If you post some code I am sure I (or anybody else) can give you suggestions to address the calls differently. – Sebastian Kessel Nov 30 '15 at 17:19
  • I have updated the post with the code. – Sirisha Kodi Dec 1 '15 at 11:29

Until the Known Issue Apex Continuation is causing "Unable to restore input value state - state value missing for component..." when using custom component within apex:repe is resolved your easiest option could be to move away from using the continuation to perform the callout. Instead use the direct blocking callout.


all the corresponding outputText,outputLabel fields should have value attribute. Even though there is no value to be assigned just give a null value Example: apex:outputText value=" ">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.