Solución:
Finalmente, resolví el problema. Estoy pegando mi código aquí como referencia
var result = sforce.connection.login("[email protected]", "mypassword+mysecurityToken");
sforce.connection.init('{!sessionId}', 'REST web service url'); // here pass current session id of the org from which you are making request.
sforce.connection.remoteFunction({
url : REST web service url,
requestHeaders: {"Authorization":"Bearer "+result.sessionId, "Content-Type":"application/json"}, // here pass the session id of the org in which you have your REST service
requestData: data to post in JSON format,
method: "POST",
onSuccess : function(response) {
console.log(response);
},
onFailure : function(response) {
alert("Failed" + response)
}
});
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)