You need to sign in to do that
Don't have an account?
Tim Miller 26
Visualforce Override button redirect to a lightning app
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?
while redirect to lightining app you have make client call not from server side.
use below updated code. kinldy check and let me know if its works.
Hope this will help you. Mark it solved if its works for you.
Thanks
karthik
All Answers
in your VF page you are using any Javascript code to navigate user. kinldy post your code.
Thanks
karthik
my VF Page does not use any javascript code it is all done on the VF page action wich calls the action pagereference method on the controller.
Thanks
<apex:page standardController="Lead" extensions="LeadExtension" sidebar="true" tabstyle="Lead" action="{!Action}">
</apex:page>
My Class:
public with sharing class LeadExtension {
public PageReference Action(){
string str = UserInfo.getUiThemeDisplayed();
if(str == 'Theme4d'){
return new PageReference('/c/LeadSearchApp.app?src=Lead&type=lex');
}else{
return new PageReference('/c/LeadSearchApp.app?src=Lead&type=cla');
}
}
}
while redirect to lightining app you have make client call not from server side.
use below updated code. kinldy check and let me know if its works.
Hope this will help you. Mark it solved if its works for you.
Thanks
karthik
Any suggestions for getting that to go through?
i am new to lighting pages. we have both lightning & classic users for our application,and i am overriding the new button on case object, in lightning view new button will open lightning page and in classic view it should open std. case new page. now lightning page is opening for both. any suggetions on this.
Thanks in advance!
-Suma