I have notice that when i use a publisher action that does a redirect using the sforce.one.editRecord, and when i click on save or cancel, it return back to the calling page, which is blank (normal because im doing only a redirection). How to capture if teh cancel button from standard page Icame from was hit? there is no return url i can specify using the sforce.one.editRecord function. Does anyone has an idea ?
-
Did you ever figure this out?– Doug AyersCommented Aug 19, 2015 at 23:41
-
I manage to do some kind of redirect, with a custom button on my page , that allow the user to be redirected properly. As i was using a VF page, i had the capability of doing this at least. :(– vanessenCommented Aug 20, 2015 at 6:59
Add a comment
|
1 Answer
Try subscribing to the publisher.clearPanelState
event:
// This subscribe fires when the user hits 'Cancel' in the publisher
Sfdc.canvas.publisher.subscribe({name: "publisher.clearPanelState", onData:function(e) {
// do something here...
}});
Fired by the publisher when the canvas app/page is deactivated or hidden. This can happen when the user selects a different application in the publisher or after the Share/Submit button has been clicked.
http://res.cloudinary.com/hy4kyit2a/image/upload/s1_dev_cheatsheet_cheatsheet.pdf