Callout loop not allowed error while calling external service from an apex rest resource

  • 2
  • Question
  • Updated 3 years ago
Hi,

  When we try to call an apex class from skuid we are getting an exception saying callout loops not allowed, basically this apex class is making an external callout 

http://salesforce.stackexchange.com/questions/107201/callout-loop-not-allowed-error-while-calling-ex...

Is there any workaround to make callouts to external system from skuid and getting back some response.

Script :


var params = arguments[0],      $ = skuid.$;
    var model = skuid.model.getModel('Application');
    var row = model.getFirstRow();
    var request = '{"vin":"' + row.Number__c + '"}';
    console.log(request);
    alert(request);
  // var request={VIN:row.Number__c};
    sforce.connection.remoteFunction({
     url : 'https://ap2.salesforce.com/services/apexrest/getVINdetails',
    requestData: request,
    method:"POST",
    requestHeaders:{
       'Content-Type' : 'application/json',
       'Authorization'  : 'Bearer '+sforce.connection.sessionId
    },
    onSuccess : function(response){
       alert('sucess'+response);
        var obj = JSON.parse(response);
        var make=obj.make;
        var model=obj.model;
        var year=obj.year;
        alert(make);
        alert(model);
        alert(year);
     },
    onFailure : function(response){
    
    alert('failure'+response);
    }
    });
    
    
    
    
Photo of rajasekhar reddy

rajasekhar reddy

  • 282 Points 250 badge 2x thumb

Posted 3 years ago

  • 2

Be the first to post a reply!