Practice Exams:

Salesforce Certified Platform App Builder – 5 – Business Logic and Process Automation

  1. Business Logic and Process Automation Introduction

So now we’re ready to talk about business logic and process automation. Now, according to the exam guide, this particular section is a 27% weighting. That is by far the largest weighting of any section in the exam guide. And so there’s a lot of core concepts that you have to understand really in depth. And so I would recommend that if you spend a majority of your time in this particular section that get you about halfway to being able to pass the exam. There may not be as many lectures in this particular section as a few sections ago. That’s because I was going through how to create each individual type of field on the platform. But rest assured that this particular section is the most key in order to pass the exam. So pay attention and make sure that you understand this section fully before moving on. We cover a lot of amazing things in this section and it is here that Salesforce really shines and what I believe is the reason why they’ve been so successful since their formation in 1999.

And that’s because it gives you the ability through clicks instead of code to do business process and automation. And so originally Salesforce accomplished this through what are known as workflow rules. And so I show you how to create workflow rules and the four different actions you can do from them and you can do these either immediately or in a time based fashion. I also introduce you to the time based workflow queue and how to see if things are sitting in there and scheduled to fire and then as well, how they remove out of there if they no longer meet the criteria. With these various field updates and email alerts and other types of actions that can be done from workflow rules, we get into even email templates, how to create and work with those with workflow actions. And then from there we get into newer functionality that Salesforce has recently provided to further extend business process automation. Functionality that would be the cloud Flow designer and the creation of Flows and then as well, the Process Builder.

I show you how to do things that can’t be done with workflow rules but can be done with Flows and with the Process Builder. And then with so many different tools and options available, it can be confusing to know what can and can’t be done with these different tools. My goal in this section is to show you what can be done with each of these tools and where the line is drawn to where you have to go from a workflow rule, for instance, to resorting to a flow or creating a process, or finally resorting to having to write code, such as writing a trigger, for instance. Now, you don’t need to be able to write a trigger in order to pass this exam, but you need to understand where these different lines are drawn in knowing what can and can’t be done with the process builder and with flows and with workflow rules. Another automation piece that we cover in this section are approval processes.

And then I also show you how to visualize those with the process visualizer as well. And then towards the tail end of this section, since we’re talking about process automation and workflows, I also talk about the order of execution. There’s a certain order that salesforce performs actions and it does it the same way every time. Now there’s about 20 some odd steps in this chain of events and you’re not expected to know all of these in depth in this particular certification. But it is a good idea to have a general grasp of what fires before what so that you know how to best control the order of events, so that you’re able to accomplish the desired result when you’re creating workflow rules and processes, et cetera. It’s also in this section that I preview the Developer Console and show you how to do some debug bugging features in that as well. Sometimes things go wrong whenever you create a process or a flow and errors are thrown. And so I show you how to get to those debug logs and how to view those in the developer console as well. That helps with troubleshooting. And so also in this section, which is very important for process automation and business logic, is this concept of record types. And so in the next lecture we’re going to.

  1. Introducing Record Types

Okay, let’s talk about record types. And so I’m going to go into Setup and go to the Object Manager and we’ll start talking about record types as we get into the Object Manager. And specifically we’ll start with the Account Object. And so if you’re navigating to any sort of object in Salesforce in the Lightning Experience interface, you notice here we’re on the Account Object. One of the links here is for record types. There’s currently no record types for accounts. In the next three lectures, we’re going to be going through creating Record Types for Accounts, Contacts and Opportunities.

And so if I go back to the Object Manager as well and we look at contacts, we can also verify that there’s no record types for contacts either. So just bear in mind that we’re in the largest section of this course as far as business logic and process automation. There’s a lot to understand and grasp in Salesforce. And so the main thing to keep in mind as we first approach this large topic around business logic and process automation is that you’re going to want to leverage record types. Now, record types enable you to designate different types of accounts such as a client or prospect or a former client. You can segment different types of contacts such as someone that is an internal employee versus someone that is an employee of a company that you’re trying to do business with. You can also do different types of opportunity record types such as a type of opportunity related to a product that you sell.

Another record type for an opportunity could be an installation record type. And so right now, out of the box with there being no record types, we can’t really delineate the different types of accounts that we may be working with. For instance, as we dive more deeply into record types and we start doing these helpful practice activities in our own Salesforce instance of creating different Account Record types, contact Record types, and Opportunity Record types, this will all begin to branch out into different types of accounts and then we’ll be able to create different types of opportunities. We’ll be able to associate different types of contacts with these accounts. Then later on we will assign different page layouts to different profiles based on those record types. And so in the next lecture, we’re going to dive right into creating an Account Record Type.

  1. Helpful Practice Activity – Creating Account and Production Record Types

Okay, so in this lecture, we’re going to create a couple of different record types for Accounts. And then we’re also going to round out this particular lecture with also creating record types for our application. And that would be the different types of productions that we want to account for, such as TV shows, movies and video games. But before we do that, I want to get into creating different record types for Accounts. Now, Accounts will be different companies that you work with in salesforce. And so to be able to differentiate between clients and then prospective clients, we need to create a couple of different record types. So if I go into Setup and go to the Setup home, and then if we go into the Object Manager, so I’m going to select the Account object. And then we showed this previously where we go to the Record type link and we see that there’s no record types currently for accounts in salesforce. So I’m going to click the new button by the Record types related list.

Now we’ll bring up a screen where I can then create a new record type for Account. So I’m going to base this on an existing record type of master because there are no other record types in existence so far. For the record type label, I’m going to select Client or I’m going to enter Client as the record type name and label. So the name is the API name that will show behind the scenes and then the record type label is what end users will see. And so you can enter a description here. This is helpful so that when someone goes to create a new account record, you can provide a description to help guide them on what sort of record type to choose if they have access to multiple record types. So Client record type would be someone that we have done business with before.

So once you’ve entered your description and I’ve put here accounts that we have done business with, these usually have a one opportunity in their account history and this would be for a client. And then you can enable these record types by profile. So if you wanted to only make this available to a few profiles, you can do that by checking the checkbox at the top here to deselect all and then select the profiles that you want to allow access to this new record type. So I’m going to select the custom marketing profile. Then I’m going to scroll down. I’m going to select the system administrator as well, since I’m the sysadmin here. And then I’m going to scroll down further and click Next. Now, one thing is you notice this is a two step process and this is a wizard here. And before we go further, I want to go back, I want to show you how to go back here because I want to click on Previous and show you another thing that’s important to note.

So when I deselected all it also deselected making this a default record type. And so one of the behaviors of salesforce, whenever you do add record types in your first new record type that you create, it is enabled as the default here and marked as the default. So this is not editable either. And so whenever you create a new record type, the first one is set as the default. Then for those profiles that you choose here, I wanted to signify that before we move on because once we create an additional record type we can then decide which one we want to make the default for those profiles. So for this client record type we can apply either one layout to all profiles or apply a different page layout for each profile. And so I’ll show you what this looks like. If we do one layout for all profiles, we have the option of doing these different page layouts.

Now we’ll probably be creating additional page layouts in the future. And so for example, we just have this account layout here which would be for all the different profiles. Now we have only selected this to be available this particular record type to the system administrator and this custom marketing profile. So this does not override that previous designation. This is just if these other profiles had access this would be the page layout they would have. And so I’m going to click Save and New to create another record type and this will be for prospect.

Now I’m going to base this one off of the client record type. I’m going to call it Prospect tab over to also fill in the record type name. So I filled in a description here for a prospect record type for an account and this is based off of the existing record type of client. Then I want to enable this for the custom marketing profile as well. So you notice what’s different here is that the record types currently available for this profile are client which is a default. And so now if you notice when I select enable for this profile, it doesn’t automatically check to make this the default. And so for example, if you think about dealing with a marketing user in salesforce, they’re usually trying to win new business and reach new customers and so they don’t deal with existing clients so much, but they deal more with prospective clients which would be prospects. And so we’re going to enable this prospect record type and market the default for the custom marketing profile. I’m also going to enable it for my own system administrator profile, but I’m going to make client my default account record type. So as a sysadmin I’ll be dealing with existing clients more, but the marketing profile will be dealing with the record type of prospect more. So this is a way that you can start to delineate and segment your audiences of users to deal with the types of records that they tend to deal with.

So we’re going to click next and then I’ll show you how this works, applying a different profile for each layout. So this is a Prospect record type. And so for the custom marketing profile, I’m going to select a different page layout here and that’ll be the Account Sales layout. And then for the system administrator, I’m going to select the Account support layout. And this is just to show you some different ways of doing things. I’m going to click save. And so we’ll go much more in depth into assigning default record types here in the next few lectures as well as assigning page layouts based on record type as well as we get into even an example exam question later on in this course. But for now we have a couple of different record types for Accounts. If I go back to the Object Manager and go to Account and we go to that related list for record types, we’ll now see two record types and here’s where these descriptions come into play. And as a reminder, we’ve got Prospect and Client. And I read previously the client description, but the Prospect description and this will be a common thing that you’ll encounter in Salesforce as you work in like a sales cloud environment, is that Prospect is a prospective client. We have yet to do business with this type of account.

There will usually be an open or lost opportunity in the account history for these types of accounts. So we’ve got our two different record types and you can edit or delete these from the down arrow here. And then as well you can create additional record types by clicking New or assigning Page Layout Assignments by clicking the Page Layout Assignment button. But before we continue on with different types of record types or going to the next lecture where we’ll be actually creating record types for different types of contacts, I want to go into my Productions object by going back to the Object Manager. Now, if you recall when we were talking about productions for our own app, we talked about how eventually we would introduce different record types for productions and that would be for movies, TV shows and video games.

And so we’ve got a note here as well. And this is almost like a reminder. Productions can be movies, TV shows or games in our app. So I’m going to click on production. This is our custom object which has no record types currently. And now we’re going to go through the process of creating record types for our custom object. So I click on New by the Record types related list and so then there’s no record type. So we’ve got to select Master here. And the first production we’re going to do is Movie. I’m just going to be brief in my description and I’m going to enable this for all profiles and have the Movie record type for productions, be the default and click Next. And then we just have the one page layout. So I’m going to apply the one layout to all profiles and click Save and New. So we’ve done the movies record type. So now we’re going to do TV Show. I’m going to make this based off of the existing record type of master. I’m going to select this as an active record type.

I’m going to enable for all profiles but not make this the default and click Next. And then I’m going to apply the one layout to all profiles. We’ll do different page layouts later. I’m going to click save and new. And then for video games I’m going to do the same as far as checking active, entering a brief description. I’m going to enable this for all profiles but I’m going to leave the default deselected for this particular record type. I’m going to select the same one page layout for all profiles and I’m going to click Save. And so now for our production object we’ve got three record types and this will give us more flexibility for our application that we’re building. And so we’ve got movie, video game and TV show. So now that we’ve created record types for accounts and for our production custom object, we’ll next go through the process of creating different record types for contacts in the next luck.