• Bert Van Hove
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi,

I'm currently doing a transition from classic to lightning. I have a VFP and an apex class and I use a button override for the Lead convert button.
However I can't seem to find how to navigate to the lightning version of the convert page. Atm I use a pageref to /lead/leadconvert.jsp, but this seems to always redirect me to the classic version of the page, even tho i'm in lightning before that.
Any ideas?

Thanks a lot.
Hi guys,

i'm working on a project where I use a visualforcepage, a standardcontroller for opportunity and extend it with an apex class.
The apex class gets the AccountId from the current Account via getRecord().
This works perfect in Classic mode, but in Lightning getRecord() returns NULL.

Any ideas?
Thanks in advance
Hi guys,

i'm working on a project where I use a visualforcepage, a standardcontroller for opportunity and extend it with an apex class.
The apex class gets the AccountId from the current Account via getRecord().
This works perfect in Classic mode, but in Lightning getRecord() returns NULL.

Any ideas?
Thanks in advance
Hi,
I am totally new with lightning and I am trying to switch some objtects from classic to lightning.
I have one visualforce page that checks one variable, and if it is true it redirects to another direction.
In classic it uses the "window.location.href", but it won't work with lightning, so I have added the following code:
 
<apex:form id="form">
        
        <apex:outputPanel rendered="{!$User.UIThemeDisplayed == 'Theme4d'}">
            
            <script type="text/javascript">
            
            var precondition = {!Lead.Conversion_Precondition__c} || {!ISBLANK(Lead.RecordTypeId)};  
            
            if(precondition){
                String url="{!URLFOR($Action.Lead.Convert, Lead.Id, [retURL='/' + Lead.Id, nooppti=1, IsReminderSet_fu=0], true)}";
                sforce.one.navigateToSObject(url);
            }
            </script>        
        </apex:outputPanel>
        <apex:outputPanel rendered="{!$User.UIThemeDisplayed == 'Theme3'}">
            <script type="text/javascript">
            var precondition = {!Lead.Conversion_Precondition__c} || {!ISBLANK(Lead.RecordTypeId)};  
            if(precondition){
                
                window.location.href = "{!URLFOR($Action.Lead.Convert, Lead.Id, [retURL='/' + Lead.Id, nooppti=1, IsReminderSet_fu=0], true)}";
            }
            </script>
        </apex:outputPanel>

even if I put the sforce.one.navigateto alone it does not work.
any suggestion?

Thanks
We have overriden the Standard 'view' action on the Opportunity Object.

We have two different Record types - Type A and Type B. 

Type A - navigates to Custom visualforce page
Type B - Navigates to Standard page.

To achieve this we have used "Nooverride" parameter. See code below.

Post Winter 17 release in the sandbox, the application doesnt respect the "nooverride' paramter and the view action is going into infinite loop in Salesforce lightning app. 

Let me know if you have faced similar issue and any workaround that worked for you.

------------------------------------------------------------------
if (c.recordtypeid == recordTypeId[0].id) {
               
            newPage = Page.CustomVFPage;
        } else {
            newPage = new PageReference('/' + c.id +  '?nooverride=1');
            newPage.getParameters().put('nooverride', '1');
        }