I have developed a Lightning app that uses the force event : e.force:navigateToObjectHome to get the user to an object page. This event has been working fine in 3 sandbox so far but now that I am testing it in a 4th sandbox the event has stopped working.

When debugging this issue I found out that the event is undefined in Sandbox #2. What would trigger such an issue? I even added the event as an aura:dependency to my component, and it still does not work.

The app itself is contained in a VF page and I have used Joe Buschmann example on how to send force events to the VF page and have the page handle them: http://joebuschmann.com/salesforce-lightning-navigation-events-in-a-visualforce-page/

  • 1
    Thats insane . Did you try switching locker service off to see if thats causing issue or its a separate bug ?I think you will need to open a support case and escalate – Mohith Shrivastava Mar 28 '17 at 20:25
  • 2
    Actually Locker Service was on in Sandbox 1 and off in Sandbox 2. However switching it didn't help. – MaxPaq Mar 28 '17 at 20:39
  • 1
    Seems like the issue is with either the lightning app or the Visualforce page that contains them. I was able to fire the event when my component was by itself in a Lightning record page. – MaxPaq Mar 29 '17 at 13:44
  • 1
    Welp, Mohit you saved my life once again with this blog post: cloudyworlds.blogspot.com/2016/02/… The issue was with the Visualforce page where I was initially trying to retrieve event information doing this: event.$params$.url Changing it to: event.getParam('url') Solved the issue. I will update the post and post a solution. – MaxPaq Mar 29 '17 at 14:58

The issue was with the handlers on the Visualforce page. Replacing $params$.scope with event.getParam('scope') fixed the issue.

I do not have an answer as to why one is better than the other and why the first option worked fine in 1 sandbox but not the other.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.