Skip to main content

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 = argumentse0],      $ = 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);
    }
    });
    
    
    
    


Be the first to reply!

Reply