You need to sign in to do that
Don't have an account?
visualforce button is not working need alternative
is there any other alternative for the following code to work ? i need lightening component instead.
<apex:page standardController="Lead" tabStyle="Lead" sidebar="false" lightningStylesheets="true" docType="HTML-5.0" > <script src="/soap/ajax/43.0/connection.js" type="text/javascript"/> <script> function ReloadPage(){ setTimeout(function(){ window.top.location='/{!Lead.Id}'; }, 100); } </script> <apex:form > <apex:inlineEditSupport showOnEdit="SaveButton" /> <apex:slds /> <div class="slds-scope"> <center> <apex:commandButton value="Save" action="{!Save}" onclick="ReloadPage()" style="display: none;" id="SaveButton" /> </center> <table class="slds-table slds-table_bordered slds-table_cell-buffer"> <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-table_col-bordered"> <thead> <tr class="slds-text-title_caps slds-text-heading--label"> <th scope="col" class="slds-cell-buffer_left"> <div class="slds-truncate" title="Class">Class</div> </th> <th scope="col" class="slds-cell-buffer_left"> <div class="slds-truncate" title="Scheduled">Scheduled</div> </th> <th scope="col" class="slds-cell-buffer_left"> <div class="slds-truncate" title="Claimed">Claimed</div> </th> <th scope="col" class="slds-cell-buffer_left"> <div class="slds-truncate" title="Allowed">Allowed</div> </th> <th scope="col" class="slds-cell-buffer_left"> <div class="slds-truncate" title="CUD">CUD</div> </th> <th scope="col" class="slds-cell-buffer_left"> <div class="slds-truncate" title="Status">Status</div> </th> </tr> </thead> <tbody> <tr> <td scope="row" > Secured </td> <td> {!Lead.Secured_CUD__c} </td> <td> {!Lead.Secured_Claim_Status__c} </td> </tr> <tr> <td scope="row" > Unsecured </td> <td> {!Lead.UnSecured_CUD__c} </td> <td> {!Lead.Unsecured_Claim_Status__c} </td> </tr> <tr> <td scope="row" > Priority </td> <td> {!Lead.Priority_CUD__c} </td> <td> {!Lead.Priority_Claim_Status__c} </td> </tr> <tr> <td scope="row" > Admin </td> <td> {!Lead.Admin_CUD__c} </td> <td> {!Lead.Admin_Claim_Status__c} </td> </tr> <tr> <td scope="row" > Admin503B </d> <td> {!Lead.Admin503B_Claim_Status__c} </td> </tr> <tr> <td scope="row" > Totals </td> <td> <apex:outputfield value="{!Lead.Scheduled__c}"/> </td> <td> <apex:outputfield value="{!Lead.Claimed-__c}"/> </td> <td> <apex:outputfield value="{!Lead.Allowed__c}"/> </td> <td> </td> <td> </td> </tr> </tbody> </table> </table> </div> </apex:form> </apex:page>
The javascript button doesn't work in Ligthning.
You can rewrite completely your VFP in Lex (Lightning Experience) but that is not necessary and that is quite complicated for a result not different for the end user (SLDS is already used here).
You just need an extension (apex class): LeadCtrl
<apex:page standardController="Lead" extensions="LeadCtrl" tabStyle="Lead" sidebar="false"
All Answers
The javascript button doesn't work in Ligthning.
You can rewrite completely your VFP in Lex (Lightning Experience) but that is not necessary and that is quite complicated for a result not different for the end user (SLDS is already used here).
You just need an extension (apex class): LeadCtrl
<apex:page standardController="Lead" extensions="LeadCtrl" tabStyle="Lead" sidebar="false"
It is more to give some examples of standard tests for an extension than the minimal sufficient test for the 100%.
The better thing to do now is to open a new question because no one will comment an old question excepted me and you will be more successful with a new fresh question.
Samples for Lightning Component and Controller: the trailhead projects are full of complete samples
Becoming a developer for Ligtnning component, complete trail: https://trailhead.salesforce.com/en/trails/lex_dev
https://developer.salesforce.com/forums/?id=9060G0000005mpwQAA
https://developer.salesforce.com/forums/?id=9060G0000005m4vQAA
class:
same as the one your provided.
this does not work in production