RemoteAction Logging and URL Parameters

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Looking for help with logging AJAX proxy calls via sforce.connection.remoteaction.  How can I see what is being sent to the external server?  

Also, should there be any issue with using URL parameters with this sforce.connection.remoteFunction?  

Like this:

sforce.connection.remoteFunction({    
url : "https://domain/page?param1=xxxxx&param2=xxxxx",
   onSuccess : function(response) { 
      alert("Success! result:" + response);
      console.log(response); 
   }, 
   onFailure : function(response) { 
      alert("Fail! result:" + response);
      console.log(response);
   } 
});

When I call the URL via the browser it appears to pass the url parameters correctly.  When I use remote action I am getting a json response from the external server that the url parameters are not correctly passed through. 
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Louis Skelton

Louis Skelton

  • 4,878 Points 4k badge 2x thumb
Have you tried using something like http://requestb.in/ ? You can setup a url to send to and see what was sent. You can then diagnose, correct any issues and then point it back to your target url.

Alternatively you can dive into the developer console in the browser and look in the Network tab: https://community.skuidify.com/skuid/topics/rest-api-debugging

Sorry if this wasn't what you were getting at!
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb
Thanks Louis!