It's Magic! Salesforce Dynamic Forms - Beginner Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey salesforce friends and welcome back to the channel if you're new here my name is adam feusten and i'm a salesforce consultant based in the uk and yes i've been doing this for quite a while now so i've been around the block a little bit today though we're going to be looking at dynamic forms yes that relatively new feature that allows you to customize your page i'm not going to say page layout because it's meant to get rid of page layouts eventually hopefully but it yes allows you to customize a page in the way that you can put fields pretty much wherever you like you can also put some visibility conditions on there as well so certain fields will appear and disappear depending on whether you maybe click a certain value on a field or if something changes that makes the condition true or maybe false there are some gotchas to watch out for as well which we'll go into but without further ado let's get straight into it [Music] right so we're gonna go straight into my developer org and for all of you that have seen this before click in the description below and you'll see a link to set up your home developer org highly recommended so you can play around like i am now and also links to trial head so that you could set up your own profile do more uh training get badges get your certifications and you can also follow me on there if you'd like to anyway um i'm going to go into my developer org here and the first thing really to figure out is where are dynamic forms and there's two types of entry points for records there's either a new record layout or an existing record layout so how do we find dynamic forms in either case well let's have a quick look so first let's have a look if we're creating a new um layout now i'm going to use a for a form i'm going to use a custom object voucher now that takes me straight to the first thing dynamic forms at the moment is only available for custom objects so that's point number one to be aware of will it be available for standard objects i pretty much will guarantee it will be i say guarantee that sounds pretty extreme yes safe harbor and all that i'm i'm pretty sure they're going to do it for standard objects because it's going to be a great feature but for custom objects there's more flexibility for them i think it's easier to launch things new features like this into custom objects so what do i do it's not page layouts like i said we'll eventually be able to get rid of page layouts you can't fully but i'll tell you that later you go to lightning record pages from there i'll just hide that you could go to new and then from new you could go okay what we're doing record page next now annoyingly it doesn't just know that i've come from the voucher so i have to put the object there but anyway um yeah let's just do that quickly does it really matter because what i want to show here is how do i get my dynamic forms from a new layout so a new layout is where you could do one or two things but the one way to do it is first when you've got a new page you've got nothing there so what you need to do is drag in first a record detail page to get you started you'll see here that this is the i won't say classic but the standard view of a detail page but you'll notice now that here in the right after you've clicked on the detail page you see upgrade now and you'll notice you probably won't notice but there's an extra tip that's been added um where you could go to upgrade to dynamic form so there's a number of ways you could do it let's just click there and this effectively is how you're able to set up dynamic forms on a new page when it's an existing record you first need to so if you i mean if i quickly go back here let me go to an existing page leave leave leave and i'm actually going to go to the record itself so yes this might be a bit of a long-winded way of kind of going about but i want to make it very clear about how you can find what it is that you want to find so if i click on my account i can go down to my object records there and here's my layout now normally if you want to edit your layout you can go up to the gear here and you'll see edit page when you do that in lightning i'll just x that you'll see my existing layout but i where do i upgrade now here i've got my tips there's my dynamic action upgrade thing but if i just click on a section i'll get it there as well so that's how i can do it in both ways new and existing layout yep it tells me a few little features like i just mentioned at the beginning of the video you can put fields and sections anywhere on the page create sections and arrange fields directly in the lightning up builder or show or hide sections and fields based on rules that you define which we'll have a quick look at in a second and let's have a look so choose the page layout that contains the fields and sections you want to migrate well it's the one i was just in and and then it says don't worry we won't change the page layout now that's an important thing to be aware of because what this is doing is not replacing well it is replacing the page layout it's not getting rid of the original page layout and there's a big reason for that now what i'm going to first do is just say yes yes please migrate the fields of sections to an accordion component so that i can improve page performance like i said at the beginning you could get better load times on pages now if when we get to this dynamic forms you're adding everything into the page in field sections it's going to take longer to load field sections load upon the selection of the record or when you open or edit the record there you go everything's loaded up front accordion sections and also tabs are not loaded until you click on them so that's where you can kind of be a little bit clever with the layout you can kind of think right i'll only put the main fields in this field section when the page loads but i'll i'll put other fields in kind of accordions or even in other tabs just to try and improve page performance you only need to do this if your page is going to have loads of crap on it um but there you go you you can improve performance so let's have a look yes that's the page layout that i want convert it into dynamic forms ooh so what have we got here um okay so i just realized that there weren't hardly any fields on this object so i've just added a few more fields just give a better example um for us to go through with these dynamic forms and what they can do so just go back um i've added a few more fields here so show me more check box more options uh which is a pick list and something some text from the filter it says awesome baby right what am i gonna do with this right well of course in your situation you'll probably have some real situations to deal with but i'm just going to go and edit this page again go back into the lightning component view um now i've already converted this if i just go here upgrade now convert this yep okay next yes i want to use this layout finish so what i'm going to do first is i'm actually going to get rid of i'm going to start from scratch okay i'm going to actually go right down to the bare bones so that we can actually reconstruct this now by doing that it comes to my first thing that you can't drag fields if i go to my fields here i can't just drag this into there it's all grayed out doesn't work you have to add a field section first so if i add a field section there there we go i can then see that i can do it one column or i can do it two columns yeah great and then from there i can see well firstly i need this universally required field so i'll drag that one in that's essentially my account field fine it says required done done done the next thing i want to do is i want to drag in my check box my check box that says show me more okay and underneath that show me more i want to have more options available right but i don't want to show this more options unless this is checked and true so if i click on this and set field visibility i can do it for this field now if i click there i can then say okay do i want to look at a record field i do and i want to choose this one so if i click there i can see show me more great and then i want to say equals true done so now i've got this special little orange eyeball or eye icon there which means that this will is hidden normally or it's it's going to be hidden and shown based on the this filter that i've got where the show me more is true if it's false so i'm going to show so we could test that out in a moment the other thing i want to do is illustrate the visibility or rule or hide and show of a whole section so this section that i've got here is just called section so let's just call this um options i don't know okay and then this one this section is called uh results the result of what i'm gonna do i'm gonna put one column for this one now as you can see if i click on this whole section you'll see i have set component visibility i can add that there and then i can look at a field and i'm going to do the more options one and on the more options there it is i can do equal to not equal to and then i can choose one of those pick list values and i only want this section to display when something awesome has been selected there you go easy peasy um yeah there you go i can click save on that one but before i do there is one important thing that i want to point out and that is this thing at the bottom that you may have noticed like what's this unsupported form factor but it's there what does that mean so this is kind of a bit of a strange thing this is actually a hidden thing in the background you won't see it in the normal desktop lightning page view but what it is is because we converted an existing page layout into a dynamic page it pulls this in automatically if i created a brand new lightning page as a dynamic form page we'd need to drag that in why do we need to have this on the layout well it's because i don't know if i said it at the beginning but dynamic forms are not available here's one of the gotchas it's not available for mobile i'm sure it will do eventually yes i've already said it's only available for custom objects not for standard objects and i said that probably will be available for all same with this it's not available for mobile yet but i would suspect possibly there will be an ability to to be able to show that um but there you go so therefore in this view you need to make sure that you've got this this in so that it can render the page for a mobile device a mobile form factor and it's just going to use the standard record detail this then tells you possibly the reason why you can't get rid of the page layout completely and that is because of the fact that you still need some original old-school layout page layout still there so that it can display something on a mobile it can't use this new dynamic form thing yet so it needs that there and the other reason why is because well page layouts will still be needed on standard objects so it's not like they could just turn the whole thing off and go yeah use these new lightning pages with dynamic forms um so there you go that's why you you can almost get away with not having page layouts for pretty much most of the desktop custom objects but not for where you use it on a mobile quite a few of the clients that i've worked with they don't use they don't have a mobile experience for users i don't really think they're going on mobile much um but there are still quite a lot that should do all of them should be using mobile and especially where there's a sales function they're going to be on the road they're going to want to be logging things and doing stuff via the web browser if not the web app anyway so that's that's the one thing i wanted to let you know about this very strange looking but important thing to add into these layouts and just leave them there anyway so great we have done that let's click save and it says activate the page now i'll do it later using the activation button let's do it now man great and then it says which is it it's not as straightforward as just page layouts lightning pages but essentially just making sure oh by the way you do know that you've got org default for the record page app default app record type profile which is kind of like the standard page layout and record type profile association um so just just be aware of all of that so i can assign this as the org default i can put it as the app default and the app record type let me go back and just put the org default yep desktop next save great i'm gonna go back and going back i am then gonna click on my dick and well it's already there sorry yeah my voucher view so this is my new view i could have done something sexier than what i've just done here but it's to illustrate now here's my main page my main tab sorry my options section i don't see there you go i don't see the other section yet show me more so let me now edit that and now suddenly it just appears if i uncheck that it's hidden if i check it it appears now let's just recap on some of those things about load times so to make this page run faster there are a number of options you can or things to be aware of if you add the fields into a field section like we've done here with the show me more and more options and the other field section below that's hidden those get loaded as soon as i load the page that record any accordion or um tab um situations are not loaded until i click on them okay so that's something to be aware of and and therefore they don't load until i click on them means that i can load this page up quicker anyway great i can now see this field based on the criteria being met this being true i can then click something okay it doesn't do anything but if i click something awesome and then click save actually i should have just tested it something okay let me click save nothing okay let me just change this to something awesome and save and don't forget if it's in if it's a another section like this or it'll gets assessed after ah i've now got my results section fantastic and i forgot to add i forgot to add the text field one moment and we're back again sergeant quickly added that in um yes now i've got my field here awesome baby because i've met the qualification criteria this field has got something awesome in it now if i kind of reverse this just to kind of illustrate the point i can go to uh something okay save it hides it again if i uncheck this it instantly removes it so there we go hopefully you found this useful um hopefully you will be able to take what you've seen there and put it into your own situation because granted i apologize i've not really had the best object data to work with but it's a dev org you can get the idea and um yes if you would like to know a little bit more about lightning there's a couple more lightning videos on this channel about some of the best features that i quite like about the lightning situation compared to classic and also be worth looking at some of the new or my top 10 spring 21 summer 20 uh one features as well so check that one out but as always really appreciate you being on the channel and watching these videos do follow me um on trailhead do subscribe but mainly mainly do let me know if you found these videos useful and if you've got any ideas of what you think i should do next to look at maybe to help other people in the community or specifically yourself if you've got a need a use case that you would like me to kind of explore and try and figure out and get some answers for you then i'd be happy to do that so thank you very much and as always may the salesforce be with you
Info
Channel: Adam Foyston
Views: 388
Rating: undefined out of 5
Keywords: salesforce, trailhead, salesforce tutorial, no code, Salesforce, CRM, Consultants, Administrators, Developers, salesforce demo, salesforce training videos for beginners, salesforce dynamic forms, salesforce dynamic pages
Id: 7M4dOWPPneg
Channel Id: undefined
Length: 18min 38sec (1118 seconds)
Published: Mon Jun 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.