• Tim Miller 26
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
I have a lightning app that when the cancel button is pressed, I try to redirect to a tab default view for the Lead object or Contact object it opens up a lightning page inside a lightning page.
Screenshot of double Screens in Lightning 
Here is my code for the cancel button event:

cancelEvent : function(component, event, helper) {
     var address = 'https://rv--timdev.lightning.force.com/one/one.app#/sObject/Lead/list?filterName=Recent';
      window.location.href = address; 
}

I have tired using force:navigateToURL and force:navigateToObject and never can get those to work. here is my example:
cancelEvent : function(component, event, helper) {
     var address = 'https://rv--dev.lightning.force.com/one/one.app#/sObject/Lead/list?filterName=Recent';
     var urlEvent = $A.get("e.force:navigateToURL");
     urlEvent.setParams({
          "url": address
     });
     urlEvent.fire();
}
  1. why do I get the lightning window in the lightning window?  is it due to lightnings iframe?
  2. why doesn't the navigateToURL work?


 
We have users in both Classic and Lightning using the standard "New" button on leads.  I need to override the standard "New" button and redirect the user to a lightning app.  I created a VF page action that will redirect the user to the lightning app.  Everything works great however for lightning users, the redirect opens a new tab in the browser.  How do I keep the redirect on the same browser window in lightning?  Do I need to create a VF page pulling in a lightning component?
I want to do a Collapse and show of search criteria in a lightning component but I want to use lightning named motions:
https://lightningdesignsystem.com/guidelines/motion/ , How do I use the lightning named motions? or is there a good example to follow?
We have users in both Classic and Lightning using the standard "New" button on leads.  I need to override the standard "New" button and redirect the user to a lightning app.  I created a VF page action that will redirect the user to the lightning app.  Everything works great however for lightning users, the redirect opens a new tab in the browser.  How do I keep the redirect on the same browser window in lightning?  Do I need to create a VF page pulling in a lightning component?
I want to do a Collapse and show of search criteria in a lightning component but I want to use lightning named motions:
https://lightningdesignsystem.com/guidelines/motion/ , How do I use the lightning named motions? or is there a good example to follow?
We have users in both Classic and Lightning using the standard "New" button on leads.  I need to override the standard "New" button and redirect the user to a lightning app.  I created a VF page action that will redirect the user to the lightning app.  Everything works great however for lightning users, the redirect opens a new tab in the browser.  How do I keep the redirect on the same browser window in lightning?  Do I need to create a VF page pulling in a lightning component?