function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kimberly AronsonKimberly Aronson 

Why does my visual force page open in classic instead of lightening?

I created a VF page in SFDC lightening sandbox to covert a lead with workflow. It works, but keeps opening in classic instead of lightening and I cant figure out why. This is very new to me so I am sure I am just missign something. Code used as follows: 
<apex:page standardController="Lead" >
<apex:form>
  <div style="visibility:hidden;">
    <apex:inputField value="{!Lead.Cancel_Workflow__c}" id="cancelWorkflow" style="visibility:hidden; "/>
  </div>
  <apex:actionFunction name="quickSave" action="{!quickSave}" oncomplete="standardConvert();"/>
  <apex:actionFunction name="standardConvert"
    action="{!URLFOR($Action.Lead.Convert, lead.id, [retURL=$CurrentPage.parameters.retURL], true)}" />
  <script language="JavaScript">
    var previousOnload = window.onload;
    window.onload = function() {
      if (previousOnload) previousOnload();
      fixLead();
    }
    function fixLead() {
      var elemCancelWorkflow = document.getElementById('{!$Component.cancelWorkflow}');
      elemCancelWorkflow.checked = true;
      quickSave();
    }
  </script>
</apex:form>
</apex:page>