function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Help with RemoteFunction

I am trying to use a remoteFunction to get the names and ids of reports currently available to the logged in account.  Here's the function I'm using
async : false,
//mimeType: 'text/xml',
cache : true,
url : '{!API.Partner_Server_URL_60}'.substring(0,26) + '/servlet/servlet.ReportList?sessionid={!API.Session_ID}',
onSuccess : reportsReady,
onFailure : errorReport

function reportsReady(response) {

function errorReport(error) {
alert('error:' + error);

When I load the generated url in a browser, I get an xml listing of my account's reports.  When run through AJAX,  it generates the errorReport with the following response:
<xml version="1.0">
Does anyone see anything wrong with the way I'm going this?

Message Edited by pfarrell on 09-12-2007 07:08 AM

As an amendment, I've found a hint about why this is failing...

Using Firebug, I can see that I'm getting an error when AJAX tries to load the following location:[redacted_session_Id]

If I try to load that location in a browser, I get the following error:

SalesforceProxy-Endpoint not defined in header

This is presumably because the remoteFunction call adds something to the header.
remoteFunction is only need if you are calling an external server. If you are calling
back to you can make the call directly.

That makes sense.  Thanks Cheenath.