Redirect Problem with Internet Explorer 11

  • 1
  • Problem
  • Updated 3 years ago
I have created a button on a Page Title that runs a snippet and the does a redirect to the parent object. It works beautifully in Chrome and Firefox. But, when I try the button using Internet Explorer, the snippet runs fine, but the redirect will not fire. So, I end up back on the original page.

Any ideas?
Photo of Jason Ziegler

Jason Ziegler

  • 80 Points 75 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Does your snippet have  JQuery deferred block construction so that the system is held until it fails or succeeds?  Lots of posts here show how to do that:  For example: https://community.skuid.com/skuid/topics/block-ui-and-show-message-until-sforce-connection-remotefun...

Do you have an “on error” branch defined with actions?  (look for an extra icon next to the Snippet action.) 

I suspect that the Chrome JS engine is faster than IE, and that the snippet is running fast enough so that its done before the redirect happens.  But in IE the redirect action is fired,  but then the snippet finishes and the redirect is aborted.   But that is a guess.


It would help if you could provide a little more context,   like a screenshot of your action sequence and the basic structure of your snippet. 
Photo of Jason Ziegler

Jason Ziegler

  • 80 Points 75 badge 2x thumb
Thanks for reaching out Rob. Here is a screenshot of my action sequence:



And here is the snippet. I was playing with some of the Block UI functionality, but it didn't seem to have much of an impact in any of the browsers. But, I may have been setting it up wrong. As you can see, I have removed that stuff for now.
//var $ = skuid.$;
//start showing message
//$.blockUI({ message: 'In a few moments, a copy of this Term Sheet will be ready.',
//    timeout: 3000
//});
var request = new sforce.SObject("Term_Sheet__c");
request.Id = arguments[0].row.Id;
request.Clone_Deep_Term_Sheet__c= "true";
var result = sforce.connection.update([request]);

if ( result[0].getBoolean( "success" ) ) {
  location.reload( true );
//  $.unblockUI();
}
else {
  var errors = result[0].errors;
  var errorMessages = errors.message;
  for ( var i = 0; i < errors.length; i++ ) {
    errorMessages += errors.message + '\n';
  }
  alert( errorMessages ); // display all validation errors
}
(Edited)