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
RumpaRumpa 

Visualforce page to be converted to Lightning Component

I am trying to convert one Visualforce page to a lightning component. Kindly sugget best way in which this can be done for the below code.

<apex:page id="poac" standardController="MyCustomObject__c" tabStyle="MyCustomObject__c">
<apex:sectionHeader title="Message" subtitle="{!MyCustomObject__c.Name}"/>
<div id="poac_content">
<h3>Please Wait.. Processing {!MyCustomObject__c.Name}</h3>
<img class="waitingImage" src="/img/loading.gif" title="Please Wait.. Processing {!MyCustomObject__c.Name}"/>
</div> <script src="/soap/ajax/22.0/connection.js" type="text/javascript">
</script>
<script src="/soap/ajax/22.0/apex.js" type="text/javascript">
</script>
<script type="text/javascript">
sforce.connection.sessionId = "{!$Api.Session_ID}";
//var returnPath = "/{!MyCustomObject__c.id}";
var poaId = "{!MyCustomObject__c.Id}";
var result = sforce.apex.execute( "COE_Alignment_Request_Handler",
                                                      "processRequest",
                                                       {selectedID:poaId,bAdd:"FALSE"} );
if(result == 'true') {
window.location.href= "/apex/RecordRemoved"; }
else
{ var errorDisplayPanel= document.getElementById("poac_content");
errorDisplayPanel.innerHTML("<h2><b>"+result+"</b></h2>"+
                                                                      "<br/><br/><a href='"+returnPath+"'> Click Here</a> to return" ); }
</script>
</apex:page>
Manvendra Chaturvedi 26Manvendra Chaturvedi 26
Hi,

Follow this link .
https://www.jitendrazaa.com/blog/salesforce/winter-18-automatic-styling-of-visualforce-pages-in-lightning-experience/
RumpaRumpa
Hi Mavendra,

Thanks!
I am looking  here to not just add style sheets for Lightning look ad feel of VF page.
The task is to convert the complete code and create a actual lightning component.