Pass Salesforce Certified Platform App Builder Exam in First Attempt Guaranteed!
Get 100% Latest Exam Questions, Accurate & Verified Answers to Pass the Actual Exam!
30 Days Free Updates, Instant Download!
Certified Platform App Builder Premium Bundle
- Premium File 576 Questions & Answers. Last update: Sep 25, 2023
- Training Course 169 Lectures
- Study Guide 306 Pages
Last Week Results!
|Download Free Certified Platform App Builder Exam Questions|
Size: 2.42 MB
Size: 316.45 KB
Size: 256.12 KB
Size: 256.24 KB
Size: 187.18 KB
Size: 227.47 KB
Size: 162.73 KB
Salesforce Certified Platform App Builder Practice Test Questions and Answers, Salesforce Certified Platform App Builder Exam Dumps - PrepAway
All Salesforce Certified Platform App Builder certification exam dumps, study guide, training courses are Prepared by industry experts. PrepAway's ETE files povide the Certified Platform App Builder Certified Platform App Builder practice test questions and answers & exam dumps, study guide and training courses help you study and pass hassle-free!
3 - Data Modeling and Management
12. Setting History Tracking for Changes to Field Values
Let's talk about setting history tracking for changes to field values. And so I'm on the Productions tab in Salesforce Classic, and if you don't see the Productions tab in your list of tabs here, you can just click the plus sign and go to the all tabs screen and select Productions. And I want to access the Wizard of Oz record. So when you click that, you'll see the record for the IMDb URL that we previously created in this jumbled mess here.
And I want to scroll down and show you some of the related lists. And these are the ones I specified upon the creation of the production record. I specified to include the open activities activity history and the notes and attachments related lists in my page layout, but I don't see a related list for any field history tracking. And so I'm going to click the Force.com menu and select Edit Layout. And it's here, in the enhanced page layout editor, that you can specify which related lists you want to appear in your page layout. And we'll get into the page layout editor much more in depth later on in this course when we're dealing with the user interface. But for now, I want to show you that by clicking the Related List link, it scrolls down to the Related List section of the page layout, and here are all the related lists that are available to me on the production page layout. And so some of these are already included in the page layout, so they're greyed out, but the ones that are not are available to click and drag down into the body of the page layout.
So I am going to drag the production history down here until you see the green line, and I'm putting it at the top of the Related List section. And so it is now placed in the section for related lists and above the open activities. So I'm going to go ahead and get rid of these other related lists for now to clean up the view a little bit, and then I'm going to click Save. So the only related list that I'll have is the production history-related list. And so I'm going to confirm that I want to overwrite the users' related list customizations, and then I want to go back to my Wizard of Oz page layouts. If I scroll down, you will see the production history-related list, which shows the date and time that this record was created and by what user. As a result, there is no other history on this record. But if you've been following along lecture by lecture, you know that we change some of these fields extensively.
Sometimes it's useful to be able to track that history on a field in Salesforce. As a result, you can specify which fields you want to track history on. To do so, simply navigate to the Force.com menu and select View object. And so in this custom object for the production object We have the custom object definition and detail that we've seen before. And the things that we've mentioned are the API name, for instance, and the designation of the things that we want to allow or track, as well as some of the basic settings for this object. And then we have our standard fields, and then we have our custom fields and relationships. And so you'll probably recognise these fields that we created previously. And so now we want to sethistory tracking on some of these fields. So, let's go ahead and click Set History Tracking. And so there are four fields here where you have the ability right now to track the old and the new values. That would be the description, the production name, the owner, and the year fields. And then there are other fields where you can track changes.
Only large textarea fields are affected, and there is simply too much potential textfilled into these large fields for it to retain previous and new values in those fields. So when those fields change that appear under the "Track Changes Only" section, it will just list on the "Field History Related List" that the field was changed, but it doesn't tell you exactly what the old versus new values in those fields are. So I'm going to click Save, and then we'll demonstrate how field history tracking works. So if I scroll back down to the Custom fields and Relationships field, you'll notice now that the Track history column has a checkmark beside each of these four custom fields. And then as well, these two standard fields I've now selected to track history on were the owner and the production name, whose API name is just simply "Name." And that's the standard field that's required on all objects, mind you.
And so now let's go back to our Wizard of Oz record. And so you could do that by clicking the plus sign, finding the tab, and clicking through several times. We could start to search up here to bring up your recent item and select; now we're going to edit this record, and I'll show you then how this appears in the related list, and we'll see this begin to fill in more. So if I click Edit, I'm going to shorten this IMDbURL fill to just include the actual URL of this record. Now this is a large text area, and so it's only going to indicate in the related list that we changed the value of this field, but it's not going to give me details if I click Save; it says here that at this date and time, this user performed this action on this particular field. And so it says that this user changed this field. Let's edit a field that will give us the field history at a more granular level, meaning that it will give us the previous value and the new value. And so let's say that instead of The Wizard of Oz coming out in 1939, Let's say that it came out in 1940, which is incorrect.
I know that there are film buffs out there who will be crying sacrilege, but for the sake of this example, let's go ahead and get this wrong and say that The Wizard of Oz came out in 1940 and click save. And so now in the production history-related list, you see that I've changed the year field from the old value of 1939 to 1940. So, let's say I realised my mistake and want to revise this further. I can double-click to do the inline editing and correct my mistake, click save, and then the history updates to show that I then realised my mistake 1 minute later. So the ability to track history on fields is very helpful when you're troubleshooting problems. And this is especially true in more complex environments that rely on processes, triggers, and workflow rules with filled updates, for example. And you might have scenarios where you're tasked with trying to figure out why a record changed. So this gives you a history of what happened or what came before what you're trying to troubleshoot and helps you narrow down what's wrong.
And so now let's look at this enlightening experience. And so, switching over to the Lightning experience, we want to first take you to the setup menu and select the object manager. And so we are on the production object; we click on it, and then we go to the fields and relationships. We see here that there's no check mark for which fields we are tracking history on. So if I click set history, tracking the experience here just brings up the same type of screen, so I can make changes accordingly. So if I wanted to no longer track history in a field, I could deselect it and click save. And you might be wondering why you would ever stop tracking history on a field. And that's because Salesforce limits the number of fields that you can track history on to 20. And so once you have objects that have more than 20 fields, you're going to have to make a strategic decision on which of the 20 fields on an object you want to track history on.
So there are ways to track history on chatter updates as well, so you can do 20 different fields there. So that's kind of a hack that you can do in Salesforce in order to track history on more fields by leveraging chatter. But that goes beyond the scope of this particular lecture. And so there may be questions related to setting up history tracking in fields on the exam. The main thing to remember is that you can do that and show the previous and current values on smaller types of fields, but for large fields, you can only see through the field history, tracking that there was a change, and you're also limited to only being able to track history on 20 records. And so next, we're going to start diving into creating some other types of fields other than the text fields that we've created.
13. Creating an Auto-Number Field
So now we're going to create an auto-number field. And to do this, I'm going to go into one of the other custom objects that we previously created, called the production position. So if I click on this custom object, I do advise that you follow along with me.
As we work through these different lectures, you can click into the production position custom object and see that we have just the four fields and relationships. Currently, it would be the four standard fields that come with this custom object, and that's the creative By the proprietor. And then there is the name field, which has a labelled production position name. So what I want to do is edit this production position name field and make it an auto number field instead of a text field. Users will have to enter information into a text field for the time being. And so in the name field, we don't want them doing that. On this production position object, there are different types of positions that someone could fill in, such as actor, cinematographer, composer, et cetera.
We're later going to create a picklist field to capture the different types of positions that someone could fulfill. But in the name field, we really don't care what this is named. This is a good use case for doing this as an auto-number field instead of a text field. So if you click on the production position name, you can't actually make edits to this field other than just accessing and setting the field level security and viewing the field accessibility that we looked at previously. So if I go back to this object, the way that you can actually change a name field from text to an auto number is by clicking on this edit button here on the object. So you edit at the object level, and it's here. When we first created the production position object, this was the screen where we specified the label and the plural label. We're in edit mode now because this is an existing object, and it is here underneath this section, where we have the data type designation.
So we want to change this from text to an auto-generated number and specify the display format. And so I'm going to specify a display format. I'm just going to somewhat follow the example that's provided. I'm just doing more letters on the left of the dash. Then I'll specify five digits for my auto numbering, and after entering a starting number of 1, I'll click Save. And so now, if you scroll down to the fields and relationships, you see that the name has a data type of "auto." So now that we've seen how to create an auto number field, I did that by editing the name field from text to auto number. Let's go in and create a new production position record. So I want to click "New." Right now, there are no editable fields, and that's because this is an auto-number field. And so we're creating a new production position, but we can't give it a name now. Later we're going to be creating a type field, and that will be an editable field. But for now, we'll just make a placeholder for this record and save it. So we have created a production position record.
So it has the auto-numbering format that I specified earlier, as well as the five characters to the right of the dash that I specified. It also assigned the first record the number 1. So as you go through and create additional production positions, it would be two, three, etc. And so we will be flushing out this object much more fully with additional fields and later lectures. But for now, that will suffice for how to create an auto-number field. Now, you're familiar with how to do that and even how to update a name field from a text auto number as well. And so now we're going to be discussing Salesforce IDs and how to identify records using Salesforce IDs.
14. Identifying Salesforce IDs via URLs and the Salesforce Workbench
So we're in the midst of the data modelling and management section of this course and working through the various aspects that you'll find in the exam guide for the certification. And we've previously created a few different types of fields. And in the next lecture, we're going to be tasked with creating a basic formula field. And so in order to do that, I felt like before we get into basic formulas, I wanted to discuss Salesforce IDs for a moment.
So, salesforce IDs are unique identifiers to which each record is linked. So right now I'm in Salesforce Classic, and I'm on the Accounts tab, and I'm going to go to a specific account record, and I'm going to click on the Barlington Textiles Corp. of America account. So now I'm on the Barrington Textiles account details page. If I click inside of my browser's URL bar, you'll notice this is a 15-character ID. And so this is one way that you can get to the Salesforce ID for a record: through the detail page. And so this sort of information related to how you can access or find the idea of a record in Salesforce may be on the exam, but it's also a fundamental and core aspect of Salesforce development to be familiar with and comfortable dealing with Salesforce IDs. And so there's a lot around the 15-character ID and the corresponding 18-character ID, and both of those mean the same thing. That is far beyond the scope of the actual exam.
However, I will provide resources for determining the corresponding 15- and 18-character IDs, as well as some background on why they support both the 15- and 18-character IDs. But from the URL, the main thing to keep in mind is that you can get to the 15-character ID this way. In the next lecture, I'm going to show you how to get to the 18-character ID through a formula. And then I'm going to introduce you to the workbench and show you how to do a SOCV query, and actually get IDs that way. But before we get too far ahead of ourselves, I wanted to highlight that on the account object, all account records have a three-digit prefix of 1. And so you can actually identify what sort of object record you're dealing with based on the first three digits of an ID in Salesforce. So zero zero one means that you're dealing with an account record.
So then, cases have a three-digit prefix of 500. So if I click on cases and go to all open cases, and there are a few in my organization, by default, these are just some fake cases that were created when I created this reseller force account. So I'm going to click on one. And then, if you notice in the URL, if I click here, the first three digits of this ID are 500, and so if you're dealing with a record that starts with 5000, you know you're dealing with a case. Finally, I'd like to show you that custom objects, such as productions, are available; we have The Wizard of Oz. The convention that Salesforce uses is the letter "A" followed by numeric values as "0," and then that increments upward as you create additional custom objects. So, if you see a record, for example, through data loader exports or perhaps someone has generated a report, and if they've included the ID, you can tell at a glance what kind of object or record you're dealing with by simply looking at the three-character prefix on the actual ID. So you can also get the IDs by creating a report and including them in the report that you create.
And then another way that you can actually get to IDs is through the Workbench, which is available through Workbench Developer Force.com. I'll make the link to this particular web-based tool available to you in the resources section of this lecture. But the Workbench is a very useful tool for Salesforce developers. It will also be a good buzzword to have on your resumes that you have previously used the workbench. So to log in, you just agree to the terms and click Login. If you're already logged into Salesforce, you just need to allow access from the Workbench to the instance that you're logged into, and then you can do a lot of things in the workbench. But what I want to do is perform a Sockwell query. So Salesforce Object Query Language is an abbreviation for "Sockwall query." It's somewhat like SQL or SQL.And if you're used to running SQL queries, you'll find it simple to create and write them.
And so from the workbench, this is a good way to actually have a wizard-based interface to help you build your soccer queries, for instance. So I'm going to go to the case objects, I'm going to select case from the dropdown here, and then we're talking about the ID field. So I want to pull in the field ID, and it automatically generates the SOCK query for me.
So select the ID from the case, and then I also want to pull in a few additional fields. So this makes a little more sense when I query this and get the results. And so cases a lot of times have a subject line, so I'm going to command-click, or control-click if you're on a PC, to include that in my query as well in this update to select ID and then also subject from cases. And then let's see if I can find the case number field. I'm either going to click Command or Control-click this Case Number field, and then I'm going to click Query to see the results. And so this queries my Salesforce instance, and it pulls in the case number, the salesforce ID, and the subject for all of the cases that are currently in my Salesforce instance.
And so you see here, case number 1013 has an ID number here that starts with 50 zeros. But the reason I'm going through this process is to not only introduce you to the workbench so you can update your resumes to be closer to that of a Salesforce developer, but also to show you in a listview here of these ID fields that these begin with the three-digit prefix of 500. because we're dealing with cases. And then, as well, if you notice, these are actually 18-character IDs.
So one way you can get to an 18-character ID is through the workbench. I don't know if this is on the exam or not, but it's just generally good to know the different ways that you can get to record IDs and Salesforce. Another way that you can get to recordIDs and Salesforce is through a formula field. And, since we're talking about creating different types of formulas, we'll do so in the next lecture when we create a basic formula field and pull in an example.
15. Creating a Basic Formula Field
Now it's time to get hands-on and do a helpful practise activity where we're going to create a basic formula field. And so we previously looked at cases, and just as a reminder, a case is a standard object record, and this deals with the service cloud. There are going to be some scenario-based questions related to actual cases on your exam. So I'm going to try to spend some time with some of the standard objects rather than just the custom objects that we made.
We'll go over more of those custom objects as we build out our IMDbclone app and implement some app-based functionality. But for the more immediate future, I want to spend some time on cases and perhaps some of the other standard objects. And so let's say that we have a scenario where we need to be able to see the unique ID for each of these records. Now, you notice there's a case number for each of these cases, and these are actually automatically numbered and unique as well. But if we wanted to know the unique ID for each of these cases, we could actually right-click and copy this link and then paste it into the URL bar. And you see here that the portion I have highlighted is the unique ID of that first record that I copied and pasted the URL for. And so it starts with a 50 zero, and then, as you can tell, it ends with the two zone six T.
If I hit enter with this in the URL bar, it will take me to the actual case record that I was selecting. And so on this page layout, under "Details," we have some information about this case. But let's say that for whatever reason, I wanted to be able to see the actual salesforce ID in the page layout and not have to do all these tricks, go to the workbench, run a report, or even bother looking at the URL. And I've had to do this for users who don't understand how Salesforce IDs work. And there's a lot of confusion around this with people as far as saying, "Well, I need the Salesforce ID," and they'll say, "What do you mean?" The case number, for instance?
No, I mean the salesforce ID. And so I've actually added the salesforce ID field to the page layout, and so we're going to do the same. Now in this lecture, the way we're going to do this is by creating a formula field. And so in this section, a large part of this has to do with creating the different types of fields and becoming familiar with what they can do. Now, formula fields are very powerful, and so this one's going to be very basic, but we're going to get our feet wet by doing a basic one. And later on, we'll do a more advanced formula field in order to create a new field. We can click on View Fields. And I find this easier to do in Salesforce Classic, so that's why I'm doing it there rather than through Lightning Experience.
However, you may prefer to do this from Lightning Experience; all power to you. That's fine. And so I am kind of toggling back and forth between the two interfaces. And so you click on the new button in the case of the customer fields and relationship-related lists. And then for the data type for this custom field, we're going to select Formula, and we're going to click Next. Now, when you're creating a formula field, you need to first provide it with a label. And so I want to call this "self-forced ID," just to be really specific with what sort of ID this is. And then, as far as the formula return type, the return type is going to be an alphanumeric mixture.
It could be some numbers and some letters, in some uppercase and some lower case. So I'm going to say that we're going to have a return type of text, and I'm going to click Next. And so now here's where it gets interesting when you're creating a formula field. And so you can do a simple formula here, and I'm on the Case object, so that fills in automatically, and I could insert a Merge field. And so there's no selection here for ID. So this is not going to cut it for a simple formula. And so I'm going to click "advanced formula." And I realise you're probably wondering, "Well, why is this called a basic formula in the lecture title?" and you're going into the advanced formula.
There are much more advanced formulas than the one we're going to do here. But I wanted to give you a glimpse of the Advanced Formula portion of the Formula Editor. And if you click on Insert Field, this gives you a navigation tree where you can traverse different objects and find the field that you're looking for. So we're just looking for the CASEID field, and it gives you the API name by default, which is just ID. And so if I click Insert, you can see how simple this formula field actually is. Our formula is just two characters, namely ID. And so since we're on the Case object, it's going to give us the case ID so I can check syntax to verify that there are no errors in my formula, which is kind of overkill because this is such a simple formula. And it says that there are no syntax errors in merge fields or functions.
And so we'll be getting into a lot of these other things that you'll find later on when we build a more complex formula, such as inserting operators and using some of the selected functions, for example. But for now, we're just going to round out the process of creating this Basic Formula field by adding a description. You'll find the ID formula fields helpful as well, not only in displaying to end users, but also because you can merge these with URLs, for instance, and do URL hacks. And so for now, we're going to finish by providing help text. So I'm providing some useful help text for the end user, saying that this is the Salesforce ID for the record you're currently on. And then I instructed them to provide this to your administrator or developer. If there is a problem with this record, trust me, this will come in handy. If you deal with end users Then in this bottom part, I usually just treat any blank fields as blanks.
Now, all Salesforce records will have an ID, so there will never be any blank records. But just to be safe, I'm in the habit of treating any blanks as blanks rather than substituting with zeroes. But there are use cases where you'd want to insert zeros instead of having to fill in the blank in a formula field, but this isn't one of them. So we're just going to click "Next." And so now we've got to specify which profiles can see this field. Now, you'll notice that although it's only visible to some profiles, it's set to read only for all profiles. and that's because this is a formula field. And even I, as an administrator, can't edit a formula field. And that's because it's dynamically pulled in from another value, and it's not editable. It's not editable at the field level, and it's not editable at the page layout. It's for display purposes only. So click next. And so now we can designate which page layouts we want to assign this new formula field to.
So I'm going to leave that set to "default for all page layouts" and click "Save." And so now we've just added that SalesforceID formula field to the case page layout. So I'm going to go to the Cases tab and open up this previously or recently accessed case 1002 and look for that Salesforce ID formula field, which has been inserted here. Now, when I hover over it, you notice that there's this padlock. That's because it's not editable; it's read-only. And that's a convention that Salesforce uses. And it's read-only because, as you remember, it's a formula field, so it's being derived from the system and is therefore not editable. If you wanted this to change in the display, you would have to change it at the source, but you can't change this at the source because it's an unique ID that's not changeable in Salesforce. So you can hover over the help link here to see the help that I previously provided. and that's helpful for the end user. And so now, just to test this out and make sure it's being pulled in correctly, I'm going to highlight, copy, and paste this in my URL. and it should just refresh to the same page. So there you have it. We've created a basic formula field, pulling in the salesforce ID onto the case page layout. And so next, we're going to continue onward and create other types of fields. And next will be a checkbox field.
16. Creating a Checkbox Field
Let's create a checkbox field now. And so to do that, we can click on the Force.com menu, and I'm on the Burlington Textiles account, which I access from the Accounts tab. Then I go to Custom Fields and Relationships and click New. Then, from the data types menu, choose Checkbox and press Next. Now we need to give this a field label. And so in this scenario, I'm going to create a couple of checkboxes to flag accounts if they are customers of ours and they subscribe to our service offerings, and then an additional checkbox if they have bought products from us. And so this first one is a service customer checkbox. The next one will be product. Customer. So for a checkbox field, we've got the field label that you've got to enter in, and then the default value defaults to unchecked. If you wanted to, you could have the default value be checked, meaning that every time you created a new account record, in this example, the Service Customer checkbox would be checked by default.
I'm going to leave this one unchecked, and then I could enter in the description and descriptions. When you're creating new fields, they're behind the scenes for administrators and developers to help end users. Then, when you're done entering the description and help text, click Next. I'm going to leave these as the defaults for the various profiles. And this is an editable field because it's not set to read-only. I'm going to click next. I'm going to add this checkbox field to all of the various page layouts for the account object, and I'm going to enter into the process of entering another new checkbox. So I'm going to click "Save and New" and select the checkbox again. Click Next. And I'm going to give a field label for this additional checkbox as a product customer. And for this one, I'm going to specify a default value checked, enter the description and help text if you'd like, and then click Next.
And then the next step of this four-step wizard here is that I'm going to leave these defaults as well, making this editable and visible to the profiles that are selected by default. And usually I just verify that my system administrator profile is selected. You may be wondering why some of these fields don't have certain profiles selected, and that tends to be more around communities and portals. And there are certain limitations on your Salesforce instance since it is a free one. You may find some limitations in not being able to use portals and communities. So I'm going to click Next, add this particular checkbox to the page layouts for account records as well, and click Save. So now we've created two checkboxes. Pretty cool. And next, we're going to go to an account and access the Barlington Textiles Account Details screen. I'm going to hide the feed to get that out of the way because we're not ready to deal with chatter yet.
You'll notice I've got two checkboxes here: one for the service customer, for which I've entered the help text, and one for the product customer. I did not enter any help text there. So there's no question mark or hover help available for that one. So I'm going to attempt to read your mind. You may be wondering if you're really a sharp individual at this point, but I thought you had selected the checkbox for the default product customer. And so why is this checkbox not checked? And that's because this is an existing record, and it's not going to go back and retroactively set the default for all existing records to check for product customer fields on all accounts such as this one. So, how does the default checked designation on a checkbox field work? Let's say you're creating a new account, which I'll do now and call ABC Corp. And I'm going to go ahead and just click Save to see if there are any required fields that I'm missing.
And there isn't. So now you notice that it defaulted to the product customer checkbox being checked. So let me create one more account by clicking "New." I'm going to enter an XYZ Corp. And before I just barely click Save, I'm going to show you that this checkbox is checked by default because that's how I specified it to behave. So in a use case such as this, as a developer, if the normal path of events would be when someone is creating a new account, if, let's say, 99% of your customers are product customers, you would want to set the default for that checkbox to be that they are a product customer. Then you leave it up to the end user to uncheck this, unselect it, and change it from its default value before clicking Save. As a result, the default value appears when you first create it, when you fill in the fields. And so I wanted to specify and show how that behaves more fully. So now that we are familiar with creating a checkbox field, we're now going to get into currency fields and create a currency field in the next lecture.
Salesforce Certified Platform App Builder practice test questions and answers, training course, study guide are uploaded in ETE Files format by real users. Study and Pass Certified Platform App Builder Certified Platform App Builder certification exam dumps & practice test questions and answers are to help students.
IT Certification Tutorials
- Top 10 Programming Languages for 2018
- Top 10 IT Certifications That Guarantee You a Well-Paid Job in 2020
- 1z0-808 Oracle Java SE 8 Programmer - Encapsulation
- PMI RMP - IDENTIFY RISKS
- ISTQB CTFL-2018 - 2018: Test Design Techniques Part 3
- PMI PMP Project Management Professional - PMBOK Guide; Sixth Edition
- DA-100 Microsoft Power BI - Part 4 Section 1 - An Introduction to the Power BI Service Part 2
- DA-100 Microsoft Power BI - Level 4: Adding more control to your visualizations Part 4
- Amazon AWS SysOps - CloudFormation for SysOps Part 4
- IIBA ECBA - Business Analysis Elicitation and Collaboration (IIBA -ECBA)
- PRINCE2 Practitioner - Introduction to Processes Part 4
- 1z0-082 Oracle Database Administration - Creating PDBs
- CRT-450 Salesforce Certified Platform Developer - Process Automation and Logic - 38%
- Salesforce Admin ADM-211 - Security and Access : Record Level Access