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
Øyvind Borgersen 10Øyvind Borgersen 10 

Convert VFP to LC

Hi,

I have a VFP for uploading CSV files. This is working ok, but times out if the number of rows exceeds around 1000 lines. In order to prevent this I'm planning to convert the VFP to a LC. 

Can someone help me converting the following code? The function is to call the class and upload all data. Add error message if the file is not according to correct format and display the uploaded line count.

<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="2">
                <apex:inputFile value="{!csvFileBody}" filename="{!csvAsString}" />
                <div align="center" draggable="false">
                    <apex:commandButton value="Import salesnumbers" action="{!importCSVFile}" />
                </div>
                <!--<div align="center" draggable="false">
                    <apex:commandButton value="Upload sales numbers" action="{!uploadCSVFile}" />
                </div>-->
            </apex:pageBlockSection>
        </apex:pageBlock>

        <apex:pageBlock >
            <p> Number of uploaded salesnumbers: </p>
            <apex:outputText value="{!vidlist.size}" />
        </apex:pageBlock>
    </apex:form>
</apex:page>
Lottery Sambad 18Lottery Sambad 18
Thanks for this nice post Dear Lottery Sambad (https://lotterysambadresult.ind.in/)
Lottery Sambad 18Lottery Sambad 18

[url=https://lotterysambadresult.ind.in/]Lottery Sambad[/url]
ANUTEJANUTEJ (Salesforce Developers) 
Hi Øyvind,

There is no direct way as such to convert vfpage to lc but you can implement a similar scenario in lc from scratch.

For reference link: https://blog.texei.com/lightning-components-auraenabled-method-parameters-whats-working-and-what-s-not-83c351356104

Apart from the above I also found the below way to put a vfpage in lc below is the link.

>> https://salesforce.stackexchange.com/questions/250293/sharepoint-integration-from-apex

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you