I am using sforce.one.createRecord() on a visualforce page. The visualforce page is then used as the override on the New button for a custom object. This works fine, except that I need to redirect the user off the visualforce page when they click Cancel. Is there any way to do this?

Alternatively, now that lightning components can be used to override standard buttons, is there any way to do the same kind of thing, via firing the force:createRecord event and then detecting an event when user clicks Cancel?

  • Are you open to creating your own custom component?
    – Rao
    Commented May 31, 2017 at 21:11
  • Yes, but trying to keep it simple, so that the same process can support several custom objects, all with record types. That might end up being how we go, but trying to avoid it.
    – sarakg
    Commented Jun 1, 2017 at 0:26

1 Answer 1


No, this seems currently not possible, since it is not officially stated in the documentation.



Per default it routes to the newly generated object, which is often NOT what we need. We can only hope, that Salesforce recognizes the severe necessity for us to get control on where the users end up after the insert. For many use cases I need to create child records and navigate to the parent. Not possible now :-(

You must log in to answer this question.

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