How to Upload Bulk Attachments in Salesforce

Salesforce Period File Upload

In this blog I am going to testify how to Upload Files using Catamenia Architect in Salesforce. We will also see how to use Screen Flows to create Record Create Forms.

If you are non in honey with Flows already it is probably because you oasis't started using and playing around with them. I was in the same guild till 3 months back. But since I have started using them I cant imagine myself not using them for most of the automations present.

SALESFORCE SCREEN FLOW

Main takeaways from this article will be:

  1. Basic idea about Salesforce Screen flow and some of its capabilities.
  2. Use of Picklist equally an input in a Screen with picklist options taken directly and dynamically from a Salesforce Object.
  3. File Upload using Screen Flows.
  4. Creating a record in Salesforce using screen flows.
  5. Use of flows in public customs pages and replicating spider web to example form with choice to upload files

Sample Employ Example:

A public Spider web to Example form for community page is needed. This form should also permit customers to upload whatever files if they require and these files must be attached automatically on the example tape created from the form. This class should be reusable on any other folio like community, record pages or dwelling pages

Screen Flows can exist quite useful for this scenario. I have shown a very basic example but possibilities are endless (Dramatic sound Inserted!).

Spoilers! (Yes, I read the catastrophe earlier starting a volume )

Here is the Concluding Design of the Period and how information technology volition look like:

SALESFORCE SCREEN FLOWS

This Flow has 7 Elements: I will go through each chemical element in detail with a mini video to show how to create and utilize each one of them. Play by Play literally!

one. Instance Create Screen Chemical element:

SCREEN FLOWS

This is the first screen where we will include all the fields which the user will need to make full in guild to submit a instance to the Salesforce.
Also, we will include a check box which volition exist used to identify if the user wants to upload files too with the case.
This  form will besides include a picklist field from Case Object.

Screen Flows have almost all input types similar picklist, checkbox ,radio push, appointment, time etc.etc.

Cool fact about picklist in Flows is that nosotros tin fetch and use any object's picklist option values from Salesforce without hardcoding them in the flow. This way our choice-lists options are dynamic and they change every bit per changes in salesforce metadata automatically. Cool Right?

Points to Note: For File Upload, flows have an out of the box feature/input component but that requires a parent/associated Record Id which in our case is the Case tape Id. But since we volition not take a case Id before creating the case and so the idea is that on showtime screen the user volition fill the fields for creating the example and then on submit a new example is created and we will store the newly created Id.
We volition so use this Id to map to Upload file component on the next screen if user check the upload file check box. This will exist more clear afterwards in the article.

Checkout the video for case screen.

two. Create Records Element :

Using this element we are just creating a new case tape from the input values from first screen.

Here we will but map the user input values from the first screen with case fields in salesforce and create the case. Elementary Isn't information technology? Checkout the video below to see how to use input values from Ist screen in this element as field values for case.

SALESFORCE SCREEN FLOWS


Points to Note: Nosotros are storing the newly created Case Id in a variable at the end. This variable volition be used afterwards to upload file(as a parent record Id)  and also to get details almost this newly created instance (Using Get Records Chemical element).

This is a hidden element and user doesn't run into this action the screen. Later user submits the fields from first screen the example is created automatically in the salesforce.

Tip: Always create a mistake path to testify errors if something goes incorrect. I have shown this later in the article.

iii. Decision Element:

This chemical element is to make up one's mind the screen that follows once user submits the form in the first screen.
The criteria for the 2nd screen is the value in the checkbox field from showtime screen. Retrieve?
Based on the input, decision element will decide if the user sees the upload file screen or not.

Please Note: See how to use the input values from the offset screen later in the video below. Value from every field or input entity we create in the screen can exist used someday later on in the menstruation and that's the whole beauty about it.

4. Attach File Screen Element:

This screen will exist shown if user ticks the attachments? checkbox field on the first screen. Using this screen user tin can upload files.

FILE UPLOAD USING SCREEN FLOWS

Here we need to employ the input file component and provide desired values in diverse options. Also, equally we had stored the CaseId in a variable at the terminate of the Create Chemical element in stride 2, we tin can re-use the same Id here to assign it to the file parent field as that is a mandatory field.

Checkout in the video how to utilize the variable assigned in the Create Record Element {!CaseIdNew} to assign as a parent of the File Upload Component.


5. Go Records Element:

Using this element we are just fetching the case tape details of the newly created case based on the Id of the new case which we stored in the create tape element {!CaseIdNew} .
The instance tape details can then be used anywhere in the menses later on to use these case record values. I take just used this to get the case number later on on to show the confirmation to user and provide them the case number. This nosotros will see in the later part of this article.

This is the default step after user submits the class with or without uploading the file.
Refer to the flow pattern diagram to go an idea of how this works and where it is used in the flow path.

6. Submit Confirmation Screen Element:

Here nosotros are again creating a screen.It will just employ the brandish text option and this screen will be shown when user fills the input grade on 1st screen and uploads the file in 2d.

Too, if user had not selected the upload file choice, then after the kickoff screen, this screen is shown direct to the user.

Here, I have used the Case Number from the Go Records Element from previous step.  I am using this value as a merge field in my text message to show to the user the example number.

Later on creating this screen only connect this with the commencement screen so that user volition see a new Instance form.

Please checkout the video:

vii. Mistake Screen Element:

This is the placeholder to bear witness on the screen if anything goes wrong due to some salesforce issues or user input. We volition once more use a screen chemical element to just display the fault/fault message.

Here we will apply $Menstruum.FaultMessage which is available out of the box to display the mistake message.

This fault screen has to exist connected with Create and Get Elements.
Please check out the video.

And we are washed. The concluding flow should await like every bit shown above in the flow diagram.

This is a just a very bones and uncomplicated employ example to demonstrate the capabilities and some useful features of the flow.

Notation: Don't forget to checkout the File Size Limits using this characteristic and File Types Supported in Salesforce's official documentation.

Activate and relieve this catamenia and get-go using it.

Demo :I have a community folio which I take enabled for Public then that invitee users tin can access the same without fifty-fifty logging in. In community architect, nether Components choose flows and select this menses for the folio(Home page in my demo).

Below is a working demo of the Flow. Please notation this demo is on a public community page.

Hope this article helps. Volition come with much more Flows employ-cases and features in later articles.

Please provide your valuable feedback and suggestions.

folmarpreaddly.blogspot.com

Source: https://www.accidentalcodersf.com/2020/06/screen-flows-file-upload.html

0 Response to "How to Upload Bulk Attachments in Salesforce"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel