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
Robert Davis 16Robert Davis 16 

sforce.connection.remoteFunction( ) on Visualforce Page

Using Salesforce Classic I am able to access an Contract Managment System by using a JavaScript Button with the standard Salesforce Page, but when I attempt to use a Visualforce Page with the following code, I get the following error:

//Should not have to change this at all 
function getEOSInfo(objectid,objecttype,callback) { 

var baseUrl = "{!$Api.Partner_Server_URL_260}".substring(0, "{!$Api.Partner_Server_URL_260}".indexOf("/services")); 
var url = baseUrl +"/services/apexrest/SpringCMEos/eosinfo?objecttype="+objecttype+"&objectid="+objectid; 
var authkey = "Bearer {!$Api.Session_ID}"; 

url : url, 
requestHeaders: {"Authorization":authkey,"Accept":"application/json"}, 
onSuccess : function(response) { 
var eosInfoResponse = JSON.parse(response); 

//Here you write your own code, this is a simple call 
var objectid = "{!Account.Id}"; 
var objecttype = "Account"; 


var formuid = "ab227d3b-188c-e711-9c0d-3ca82a1e3f41"; 
var url = "" + formuid + "&SFID=" + eosInfo.SFId + "&SFTYPE=Salesforce.Account&SFPATH=" + eosInfo.FolderPath + "&ru=%2Fatlas%2Fbpm%2FWorkList.aspx";; 

AJAX Error

Need to desperately get this working, Can you help with pointing me to the right code?

It appears, best I can tell, to be a problem with the function sforce.connection.remoteFunction( ), but I do not really understand what is happening.

Thank you in advance.