Skip to main content

#Csv To Records0 diskutieren mit

In Apex, how do I declare a CSV file, access it, pass its data to a method that inserts the contents in the database, and then close it?

 

Thanks!

 

#Apex #SOQL #Csv To Records

7 Antworten
  1. 22. Juli 2025, 17:40

    I ran into something similar a while back when working with large CSV files and Salesforce. Sometimes native import tools just aren’t flexible enough, especially if you need scheduled or automated uploads. You can check out Skyvia and some information about it on this page. They’ve got a few options for importing and exporting data between Salesforce and CSV files, and you don’t have to deal with any complex setup.

0/9000

@Salesforce Flow Automation I am using the standard file upload component in a screen flow and using the Convert CSV to records that @Narender Singh built (https://unofficialsf.com/narender-singh-brings-csv-imports-to-flow/).  My issue is I can skip the file upload and the convert action does not throw an error.  How can I either require a file to be uploaded or get the component to throw an error?

4 Kommentare
  1. 18. Dez. 2020, 15:38
    Have you tried EmptyString instead (is that an option)? Alternatively, and this isnt ideal, you could assign the collection to a number and if the number is = 0 (make the default 0 when you set up the variable) use that as your decision
0/9000