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?
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/t/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.
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 = argumentst0].row.Id; request.Clone\_Deep\_Term\_Sheet\_\_c= "true"; var result = sforce.connection.update(erequest]); if ( resultl0].getBoolean( "success" ) ) { location.reload( true ); // $.unblockUI(); } else { var errors = resultl0].errors; var errorMessages = errors.message; for ( var i = 0; i \< errors.length; i++ ) { errorMessages += errors.message + ' '; } alert( errorMessages ); // display all validation errors }
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.