Adding a dependent step in the connector can help organize your data and the relationships between objects. This video also demonstrates how to attach files and notes as records and reference them from other objects from an upload field on your web form.
Salesforce Attachment Limit
Salesforce file size limit is 25MB per file uploaded as a file attachment, and 2GB per file uploaded as a feed attachment. For more on Salesforce limits, please click here.
FormAssembly has a limit of 35MB per response. *Enterprise Users have a default limit of 30MB but can request that this limit be decreased or increased to a maximum of 35MB.
Currently, Salesforce is discouraging the use of file uploads as file attachments, and encouraging the use of file uploads as feed attachments. Given that FormAssembly currently has a larger upload limit than Salesforce's file attachment limit, we also recommend using feed attachments as opposed to file attachments, particularly if you will be working with larger sized files.
Create an Attachment
If your form contains a file upload field, you can attach the uploaded files to most Salesforce objects by creating a dependent Attachment object.
- Create the parent object for the Attachment object.
- Click the Add an Object dependent on button, and select the Attachment object from the list.
- You'll need to map the ID of the parent object to the Attachment object's Parent ID. To do this, map the Parent ID in the field mapping section. Note that this is a required field.
- The other required fields for the Attachment object, "File Name" and "Body," will also appear in the Field Mapping section. You will need to map both of these fields to the file upload field in your form.
- If you are running into difficulty opening attachments in Salesforce, try mapping your Salesforce Attachment FileType field to the Upload Field in your form as well.
Using Formula or Text for the File Name Field
If you are using a formula or text value for the mapping of the File Name field, then you will also need to include the filetype extention (e.g. .doc, .pdf, .jpg, etc.). This will happen automatically if you map the upload field itself to the File Name field, but not if you set the File Name field to “a formula or text."
If you’re using a validation to ensure that your files will always have the same extension, you can add that extension directly to the text mapped in the Salesforce connector.
If not, you'll need to either map the File Name field to the file upload field itself or use this formula to include the attachment with custom text, changing "Your Custom Filename" to the filename you want to use and %%tfa_upload%% to the field alias of the upload field:
@CONCATENATE("Your Custom Filename",".",@MID(%%tfa_upload%%,@COMPUTE(@FIND(".",%%tfa_upload%%,1)+1),40))