Skip to main content

#Csv To Records토론 중인 항목 0개

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개
  1. 2025년 7월 22일 오후 5: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개
  1. 2020년 12월 18일 오후 3: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