• Rockjack
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I have an s-control that uses the AJAX proxy remoteFunction to connect to an external URL.  It has been working correctly for several months.  Over night the remoteFunction stopped working and only returns a read timeout error.
 
"400 Unable to forward request due to: Read timed out"
 
 I have eliminated and/or tested all of the other factors: connection to external site, browser, data error, IP address whitelists, etc.  I have tried using version 11 and 12 of the API.  I have also contacted the Sales Force support line with no avail.  I know that this can occur when Sales Force slows down, but it has never happened for this long 12+ hours.
 
I am left to assume that some issue with Sales Force occurred over night.  Any Ideas?
 
Code:
function postRequest(envelope) {

 sforce.connection.remoteFunction({
  url : "https://<deleted>",
  requestHeaders: {
   "Content-Type":"application/x-www-form-urlencoded; charset=utf-8"
  },
  requestData: envelope,
  method: "POST",
  onSuccess : postSuccess,
  onFailure : postFailure
 });

} 

I have a button that executes an S-Control to create a new record of a custom object.  The custom object is a related list of the Account object.  I want to allow only owners and admins to create a new record.
 
Unfortunately the user seems unable to view the Account.OwnerId.  The s-control is executing under the users permissions.
 
Is there another way to get the OwnerId using the user permissions?
 
var userId = "{!$User.Id}";
var ownerId = "{!Account.OwnerId}";
var profileName = "{!$Profile.Name}";
 
if ((userId != ownerId) && (profileName != "System Administratorx") {
 response = false;
}
 
Thanks for any help.
I have an s-control that uses the AJAX proxy remoteFunction to connect to an external URL.  It has been working correctly for several months.  Over night the remoteFunction stopped working and only returns a read timeout error.
 
"400 Unable to forward request due to: Read timed out"
 
 I have eliminated and/or tested all of the other factors: connection to external site, browser, data error, IP address whitelists, etc.  I have tried using version 11 and 12 of the API.  I have also contacted the Sales Force support line with no avail.  I know that this can occur when Sales Force slows down, but it has never happened for this long 12+ hours.
 
I am left to assume that some issue with Sales Force occurred over night.  Any Ideas?
 
Code:
function postRequest(envelope) {

 sforce.connection.remoteFunction({
  url : "https://<deleted>",
  requestHeaders: {
   "Content-Type":"application/x-www-form-urlencoded; charset=utf-8"
  },
  requestData: envelope,
  method: "POST",
  onSuccess : postSuccess,
  onFailure : postFailure
 });

}