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
Phuc Nguyen 18Phuc Nguyen 18 

Enter new record data and upload file

I am having an issue determining how to upload a file to a new record. I have a lightning component and Apex class that creates a new record on a custom object.  I need to be able to allow the user to also add a file at the end of their entries.  But everything I see has to do with uploading files to existing records.  I need to be able to upload a file when a user is creating a record.  All help would be appreciated.
Thanks,
Best Answer chosen by Phuc Nguyen 18
Riley Griffin 123Riley Griffin 123
Please reference here if you choose to make a custom document object: https://success.salesforce.com/answers?id=9063A0000019XdhQAE

You might also be able to do something with flows. But you will have to create a custom create record button that calls this, and remove the standard one: https://help.salesforce.com/articleView?id=flow_builder.htm&type=5