Salesforce Prevent Community User From Upload Files

Welcome to another postal service in the "How I Solved This" series. In this serial, nosotros do a deep dive into a specific business problem, and share how one #AwesomeAdmin chose to solve it. In one case yous learn how they solved their specific trouble, you will exist inspired to try their solution yourself! Let's accept a look at how Deanne Walters was able to create an awarding submission process using Menstruation.

Cardinal concern problem:

We wanted our participants to fill out a program application, and nosotros wanted to collect and update their information in Salesforce. Nosotros besides wanted to limit the awarding to only those who had previously attended an information session and had gotten a specific code.

Background:

New Leaders is a professional development and leadership training nonprofit organization for school administrators, principals, and teachers. We combine virtual on-demand learning with in-person training sessions (when it is safe).

Before participants begin our programme, we need to collect relevant personal details, including some data we already accept in Salesforce. Additionally, we desire the participants to but be able to utilize to cohorts that they accept previously attended information sessions for, by using a lawmaking provided.

How I solved it:

I created an application that fits seamlessly into our Salesforce Community and restricts those who can apply to only people who have a special code using Flow.

The full application flow

1. Outline what information y'all demand to collect

In the external survey tool that we had been using, the application had been revised and changed for specific cohorts, then nosotros had multiple variations of the same questions. This technical debt led to problems in the processing power of the tool, too equally difficulty in understanding the order of the application procedure when trying to brand whatsoever updates. So, I needed to find what we actually needed from everyone in the new awarding.

I included whether questions were optional or required, and if there should be any specific question validation. I as well grouped together questions logically based on which questions should go along which screens.

When I started to build the flow, there was one bespeak where I found that I had to turn one screen of questions into two, and some other point where I had to combine 2 screens of questions into one screen. In the latter case, I had to recreate each question element and supplant any reference to them. In the old case, I had to clone the page, delete the extra fields, and make certain any references to the fields were right. I institute cloning the page much easier; so, when drafting the outline of your menstruum questions, opt to combine screens first and separate later on, rather than the other fashion around.

A spreadsheet with a column of questions, and two other columns for the short version and long version of the application

2. Outline the flow of the menstruation

Now that I knew what was going to be shown to the participants, information technology was fourth dimension to recall about what was going on behind the scenes. Here'southward my step-by-stride:

  1. Cheque the participant's cohort code against cohorts in the system and only let them proceed if the accomplice lawmaking matches an existing and open up cohort.
  2. Do not create a duplicate application record if the user stops and restarts the application.
  3. Have the user'southward progress saved subsequently each screen.
  4. Accept the power to specify what yr is next yr, and have all screens testify that yr without having to manually change each identify that year shows up.
  5. Pre-populate fields with information nosotros already have in Salesforce.
  6. Require a resume file to exist uploaded.
  7. Validate fields and evidence clear error messages.
  8. Have a custom error message if participants run into a Salesforce error.
  9. Automatically redirect users to a new page in one case they are washed.
  10. Be able to directly users to the long version of the application or the short version, depending on what their accomplice requires.
  11. Give participants the ability to register for a new accomplice at whatsoever point in time.

When you lot are doing this for your own project, I encourage you to make this list as broad every bit possible and analyze what is a must-accept and what is a dainty-to-have requirement. (Spoiler alert: I was able to do all but 1 thing on this list in Menstruum without lawmaking .)

3. Check your object's fields

The next thing I did was cheque that I had all of the necessary fields in our custom "Awarding" object. These fields will also take their own standard validation rules, so if you are making corresponding fields on the screen elements in your menstruum, then it is best do to take the field types match. That is especially true if you are pre-populating information in your flow.

I of the custom fields I congenital was a "Cohort Lawmaking" field on the record. This is how the system will match the code that is entered with the actual cohort record. I got to utilise the "Practice not allow indistinguishable values" checkbox for the showtime time! (Nerdy admin joy 🤓)

The Salesforce field editor for the Cohort Code field.

Note: Make sure you check the "case insensitive" checkbox; when I was testing out the tape, filtering by the accomplice code, it read the field as example insensitive for me.

iv. Start building the flow

This is my minimum feasible production phase; I detect what is elementary or easy and practice that. I focus on non getting bogged down in details like circuitous validation rules or custom automation. This is nigh getting elements on the screen to test.

I started with getting the records I needed, putting all the questions on screens (including marking them as required if need be), updating records (goal C), and putting in a default value when at that place was an easy option (partially accomplishing goal E).

When I created my variables in the flow, I would try to proper name them equally similarly every bit possible to the fields they would exist updating on the application record.

This stage is where you should continue an centre on your process documentation to see what you can easily get done in the initial build. For instance, I filtered past cohort code in the cohort Go Records element. That meant I could add conclusion points to divert people who entered an incorrect accomplice code, and for people whose cohort lawmaking was for a cohort that was marked as closed (goal A).

 A flow Edit Get Records page. The get is for the cohort object with filters of Cohort_Cohort__c equals the {!CohortCodeEntry}.

I as well found that when I had gotten the contact tape and the cohort record, I could determine whether or not there was an existing application beginning before creating a new application (goal B).

When I was writing out the questions and the instructions, I also kept an eye out for when next yr was referenced and had my "next year" variable ready to apply (goal D).

Pro tip: Employ a variable to reference things that might change over time, similar "Years" or "Cohorts" in this example.

This is also a risk to add in your "extras." For example, I added in a file uploader (office of goal F) and fault lines from the "Become Record" and "Update Tape" elements to a generic mistake screen telling the user email back up (goal H).

I also set up conclusion points and question visibility logic, depending on which version of the application they were using (goal J).

5. Test, fix, test, set up, and test again

Since the intended apply of this flow was in a Community, I created multiple testing scenarios to account for the special type of Customs users that Salesforce has.

I prepare up my contact Become Record element based on the Contact lookup field that is only populated on the Portal User, which meant I needed to always test the flow every bit a Customs Portal user. This also helped me detect the records and fields that the portal user profile did not accept admission to.

Message on screen says,

The to a higher place image is the most common error I hit. The Customs Portal user profile did not have field-level access to the fields I had referenced in my flow.

Message on screen says,

I likewise hit this error shown higher up. This means that the Portal User did not have plenty access permissions to the relevant record. They either needed Read access to the field or Read access to the entire object.

Flow errors volition only bear witness you one error at a fourth dimension, then this becomes a long process of running the flow until you hit an fault, then fixing the mistake and running the catamenia again. Using the Catamenia Debug functionality can assist speed things upwards somewhat, only it nonetheless requires you to run the Debug repeatedly.

6. Look for unexpected learning opportunities

When I was building out the menstruation, I found features I did not know nigh. This is where yous should continue yourself flexible to take advantage of what Flow has to offer.

For instance, one of the questions we ask is what district participants work for. Previously, we had a difficult-coded list that needed to be manually updated with districts each time a cohort started. However, now we had our unabridged Salesforce database to leverage. So, we could use the record choice set to get a list of districts we already maintained in Salesforce.

Nonetheless, at that place were unexpected challenges, too. In this case, I wanted to make sure people only saw the districts that were in their state rather than every district. I decided to employ a picklist to feed into the Record Choice Set.

A flow Edit Record Choice Set page. Condition Requirements are

I did have to exist flexible on where these questions were; I started out with them on the same page, but I needed the country picklist on one folio and the schoolhouse picklist on the next page for information technology to work smoothly.

seven. Build all of the bells and whistles

It was time to review the list of the initial requirements. I found that I accomplished more than than I thought was even possible! I looked at the rest of my requirements and did more research to see if they were possible.

In my inquiry, I plant since I was not launching this flow from a push button, I could not hands exercise a terminal redirect (goal I), and then that got deprioritized.

This is also where I worked on some things that got partially done in the kickoff build. For example,  the file uploader fastened files to the awarding record successfully, but the period did not require an upload and I too wanted a clearer success message. Additionally, I did not like that the picklist defaulted to the first value in the list and could not be auto-filled from the first build.

So now, I had time to practice additional research and intensive testing just on the specific things I wanted to change. I found that if I had a Rich Text Screen Component with field component visibility, information technology would show upward if I set it to the contentDocIds does non equal fileNames; I used that as my additional success bulletin for people once they had uploaded their resume. I too used that as a decision check in a separate Decision element to make sure people uploaded a certificate (completing goal F).

My next challenge was the picklists. I wanted them to either default to a blank value or default to what information was already entered on the stored awarding.

I tried a couple of dissimilar methods for how to set information technology up like I wanted, only finalized on this 1. I created this formula for each picklist:

IF( ISBLANK(TEXT({!Application.Field__c})), "Required Field – Please Choose One", TEXT({!Application.Field__c})).

 A flow Edit Formula page. The formula is IF( ISBLANK(TEXT({!Application.Title1__c})), "Required Field - Please Choose One", TEXT({!Application.Title1__c})).

Once that was created, I created a Choice resource. In the Choice Label, I entered the formula resource {!FieldFormula}. In the Pick Value, I put in the reference to the picklist in the application {!Application.Field__c}.

 A flow Edit Choice page. Choice label reads {!TitleOneFormula}, Data Type set to Text, and Choice Value reads {!Application.Title1__c}.

So, in the final setup, I put the custom choice starting time, then below it a Picklist Choice Set pulling from the picklist, and set the default as the formula Option resources (completing goal E).

Note: With this setup, if someone has a value already selected, then that value will prove twice: once at the top of the list, then again wherever the option is in the picklist list.

A flow picklist component editor. The Data Type is listed as Text. The Default Value is TitleOneChoice. In the choice selection list, the first is {!TitleOneChoice} and the second is {!TitleOne}.

I realized during testing that people could proceed filling out the awarding an infinite number of times. That's not ideal, then in the flow, I marked the application with a completed appointment on the record and did a bank check to come across if the application had been submitted based on that. This prevented people from submitting the application repeatedly, but if they were using a different accomplice code, they could submit a new application because it would exist for a different accomplice.

8. Add and cheque validation

In my final round of testing and building validation, I tested to find the breaking points.

One thing I was looking for was, what happens if people do not fill out the picklists but just go out them on "Required Field – Please Cull Ane" (since the picklists are "filled out", the users are able to proceed)? To stop that from happening, I added a determination element after each screen to see if any of the picklists are equal to empty string and, if that is the example, directing them to an mistake screen. I made certain to disable the "Next/Cease" navigation, requiring that the participants would just be able to go back to the original page, and all the values they already entered would still be in that location. I used component visibility on rich text components to prove or hide the error messages based on what needed to exist stock-still from the previous screen (completing goal G).

 A flow Edit Decision page. The first outcome filters are {!CurrentPosition_0} equals {!$GlobalConstant.EmptyString}.

A flow Edit Screen page. There are three display text components. The first display text component has Component Visibility of {!CurrentPosition_0} Is Null {!$GlobalConstant.True}.

Message on screen says,

Another type of validation to call back about is organisation validation. For any Number or Text screen components, I used the standard "validate input" section to make sure none of the inputs went over the system graphic symbol limit. I used the bones formula of LEN({!ScreenComponentAPIName}) < 255 and just changed the API name and max characters for each field. You should leverage screen component types as much as possible to make sure you limit on what you need to create custom validations for. For example, if you lot're updating a Number field type, use a Number screen component.

You should besides bring in real users to test your period, and see what additional information or validation you might demand to include. For instance, I had one user try to type letters in a Number screen component, so I included an additional note on that question that the field only accepts numbers. I would not have thought to do that unless I had tested with real people.

9. Embed the flow into your Community

Now it was time to put the flow into my Community. I knew we wanted this to be the beginning thing people saw when they registered, so I put information technology on the front end folio of our Community. Nonetheless, not anybody needs to see the application page all of the time. So, I restricted the audition of that Period component to people who were not participants or alumni, since those users had other things on their homepage.

Nevertheless, we nevertheless wanted to make this form accessible to people who are participants or alumni, in example they wanted to reapply for a future cohort. I of the problems with our previous form was inflexibility for current participants and alumni. So, for this requirement, I created a page and tab that would be permanently bachelor for all logged in Community users (goal K). At present, we just send an electronic mail linking to that tab; people who are logged in with existing accounts are directed to that tab, and people registering for the kickoff time will see the class on the homepage.

The New Leaders Salesforce Community page on the New Application tab showing the welcome screen for the application flow

Business results:

We have reduced the fourth dimension to update the application from multiple hours (and lots of dread) to  about five minutes! Additionally, the closing of a cohort is now something that can be done by regular concern users who are already in charge of managing the applications, instead of the Salesforce Admin.

Exercise try this at home

While this was a very complex flow, the underlying principle is straightforward. You can put a flow into a Salesforce Community in guild to collect and store information from your Community users. Here are a couple of other examples of flows you could employ in your Customs:

Update contact data

Y'all could use Flow to show people what their current contact information is and requite them the option to update information technology.

Give programme options

Utilize this as a way to let people select a programme earlier applying. Then employ that selection to direct where the catamenia goes.

Send a confirmation email

Do you lot want to notify the person that their application has been received or notify staff that an awarding has come in? Use an email notification or a Churr post.

Digitize forms

Practice you have a form that participants make full out when they start, when they cease, or at any point in fourth dimension? If you lot store that data in Salesforce, why non make information technology a flow?

Allow u.s.a. know what yous idea of this solution, and tell the states how you desire to use it with the hashtags #AwesomeAdmin and #HowISolvedThis.

Resources

Trailhead badges

  • Automation Basics
  • Menstruum
  • Community Cloud

culverocied2000.blogspot.com

Source: https://admin.salesforce.com/blog/2020/how-i-solved-this-community-users-submit-an-application-using-flow

0 Response to "Salesforce Prevent Community User From Upload Files"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel