0

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 ?

2
  • Did you ever figure this out?
    – Doug Ayers
    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. :(
    – vanessen
    Aug 20, 2015 at 6:59

1 Answer 1

1

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.

https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/canvas_sdk_publisher_events.htm

http://res.cloudinary.com/hy4kyit2a/image/upload/s1_dev_cheatsheet_cheatsheet.pdf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .