Learn Flows with Real Time Scenarios

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi hello everyone my name is reka today we are going to learn flows also called as visual workflows in Salesforce we'll go through some real-time scenarios to have a better understanding by end of this video you will be able to create your own clothes and you will also understand why in the world flows was introduced when we already got workflows process builders and triggers which does a similar job ok first question what is a flow a flow is a tool which automates a business process wait what isn't it the same thing vocalist and process builders then what is flow pop ok the simple answer is clothes are very very much advanced then process builders and walktroughs and the long answer is we got epics triggers lightning components and lightning web components with these things we can perform any custom implementation but there is a downside of it which is we need to call one has to know how to code let's say I don't know how to code but still I want to do some kind of implementation Salesforce has come up with few standard features out of which first one is workflow we don't need to code but we are very limited with workflow we can perform only poor actions if we need to perform more than that we cannot actually do it until process builder has come so process builder has been added into Salesforce lately and it can perform almost 11 actions which is more than workflow does okay but even process builder is limited so some of the examples are we cannot delete set of records we cannot do a role of some a custom role of summary action and we cannot clone a record so these things process builder cannot handle so to do that we cannot we can only do with epics triggers lightning and lightning web comments until we got a new okayed new smart kid on board which is pros flows are really really very very powerful tool if we understand flows admins will like it developers will love it ok so what makes flows so much special thing flows can't middle DUI screens no other standard tool can do it so we can build few UI screens where we can add some kind of registration forms and we can do some kind of approval rules as such and it also can perform complex actions like did heating of Records cloning go for records or here we can also perform custom role of some reactions ok to control by flows was introduced air is flows can build your screens that no other standard feature can do and clothes can perform very complex actions that process builders and workflow cannot do simple we have two types of rows a one is ScreenFlow second one is auto launch flow so how we need to select a flow type okay whenever a custom scheme has to be implemented we'll go for a ScreenFlow else we will go for after launch flow examples for ScreenFlow are let's say a requirement comes with we need to display some kind of registration form all we need to create some kind of feedback form we need to have some kind of approval steps over there so these kind of things we need to go for ScreenFlow okay we'll go ahead now flows are really hey who are you hi I am Q boy I need your help in finding solutions for my requirement please help me and one more thing Oh God yes we are right into that we are going ahead with flows which doesn't involve not even single enough what okay come and join us okay uh-oh you got scenario display a hollow world text message on home page yeah yeah this is our ancestors method so hollow world is our ancestors method to start learning any technology so as a token of respect to them we'll go ahead and try to create a simple flow to display a whole our message let's go okay as per our cute little boys requirement we need to display a hollow world message on a home page so I'm just opening any application so since application here so when an application is loaded we will be seeing the home screen of it so cue boy want wants us to display a hollow wall message on this home screen so we'll try to display I said somewhere here on top of this a system box so how to date okay I really need to go to setup first and search for flows in quick find quick find plus plus plus yeah plus it will take us to the flow screen so this here we should be seeing the stop-loss currently we don't have any so click on your clock it will take us to the flow builder page where we need to select flow type so as I have mentioned earlier to select the flow type we need to decide whether we need to display some kind of a screen to user so in our case we need to display halal message to user that is the reason we will select screen Pro in any other case if we don't want to show anything to user then we need to select Auto much flop we'll come to that later so for now we'll select screen client click on create now these are the things that it will be available so here we need to add our elements to display a message so to display any kind of message to display anything to user we need to drag and drop the screen to a world of working area now we have three things here we have herder we have body and we have footer so this is the screen that user with the same currently we don't want header or footer so we'll take them out how so if in the right panel if you see there is show header and footer uncheck them see now we have only the body of us give some screen jam here message screen okay now we need to get our body so we need to discuss a message if you see this is input so these are basically expecting some input from user we don't want any input fields we want to display a text to user now what kind of text we need to this place hello world and put it something like good yeah and this looks too mainstream I want to make it bold and size to 20 yeah this looks good so if I scroll up I I need to give some a P&M to this text okay and scroll down and see content okay now we have our message screen ready with a hard-coded text with how the world Shh so we need to convince that only then our element will recall our screen will be called now we need to click on save we need to give some name drop low so here I will be given greeting screen flow yeah so we're here asking for word selected here they're actually unclick on save so after clicking on sale there are a couple of warnings so ignore them for now and if you see the flow is an inactive Nam so we need to make it active what you don't see any buttons here we cannot make applo active in this flow builder screen remember this we need to act you activate it in floor detail page flow detail page so it will take us to the flow detail page where we would be seeing this flow click on floor so it will take us to deploy detail page this is our pro detail page now we have our version ready whenever you create a new flow a version will be created with indi active status click on activate now we are done with all step one we have completed our screen flow so always flow is ready through this plain home page so how to add our flow to our home page so go to the place of which you want where you want to add of a flow so this is our home page layout right we want off though to be displayed here so to do that click on this setup button and click on edit page remember this is same for any layout if you want to add this message to a control node you need to go to that container and click on our edit page then you would be seeing all the current contents of that page now in the left side panel you would be seeing this flow just drag and drop here on top of this assistant component now we have our flow and if you see in the right side panel we have our flow Selter by default because we have only one accepted by default if there are more than one you need to manually select it now click on save and it asks for activate just agree to whatever tasks and assign as all default for now and then secon save ya and go back to home page to see if our message is displaying or not look hello well and good day sir this is how you need to you can create a simple flow and you can add upload to any node very simple okay with this scenario we learned how to create a simple flow which displays a simple message and how to add that flow to any load so the process is same for any layout okay now we go for scenario to display a login username and greeting message that we created in scenario 1 sure with our previous scenario we learnt the basics of applause how to create a simple screen flow and how to add that flow to a layout now with the second scenario Q boy wants us to display a login username here instead of all the world it should display the login username in our case it should display hello Sheila come here okay now to display a login username we will go back to the same flow and click on open so if you click on open only then it will take us to the flow builder page now we have our message screen click on it now this is the message that we are displaying now but instead of world it should take the value dynamically in the sense whoever logs in they should see their name how so Salesforce already provides some kind of global variables something like flow or use or something like that anything if you see with dollar or basically global variables so flow global variables has a couple of variables that we can use formulas that we can use but you see current date date time X attract cetera but user variable is not one of them user name we cannot get it directly but there is a global variable for user how to get it so if there is a global variable and if here if it is not available for us we can create a form of it how so that is something we'll create it now so click on new resource to create a formula field click on resource type to formula and the data type to text and it a name to current logged in user name okay now in resource if you see there are multiple global variables flow API combination profile system and user and user role anything that start with dollar is a global variable I will scroll down again I will click on user and I will search for last name yeah user dot last name so this is a global variable which gets current logged in last name current logged in users last name so click on them and now here sir this world and delete it and such per our formula current logged in user name and then add it down here so hollow current logged in user name and good there anything within this curly braces will is basically dynamic formula which will get the value now click on then and this is an active state but we need to click on save as to save our version new current logged in user and click on sip now it is in active status to make it active we'll go back to the close detail page and then activate it so that's how you need to activate a built-in you edited a new version will be creative it and here it is so this is our first version which is having follow 1 this is our second version where it is having our current mounting user logic now click on activate now we have a workflow ready to cook so we'll just already this 4 has been already added we just need to refresh this page to see the change repress and it should display my name comma yeah here we go hello chicken then good tip ok here is the tip always give meaningful names to flows elements as if the person who maintains your clothes will be a violent psychopath who knows where you live I am really sure you really don't want to be in his hit list so always try to give meaningful names so that even in in your future if you want to go back to your flow and do some updates you will understand when you have made that change in your previous version ok let's go ahead with the next scenario display a new contact page on a comp age this should take first name last name email as inputs from user so this is basically create a quick contact from a complaint itself okay sure thing okay if you understand the previous scenarios properly you can throw your Dignidad now because with this current scenario we'll be going through the intermediate level okay now we will talk about this scenario that Cuba has given so he wants us to display a quick contact page let me open a simple account now okay this account so Cuba wants us to display a simple box here something like a quick contact box where user can enter first name last name and the email as such and click on save and it should create a contact that's what his expectation is so how to achieve it so we need to create deploy again so to do that go to flow and go to lists flows yeah and now scroll down click on new flow and now it will be taking us to this flow type so we need to set our screen flow again why because we need to display the input fields for quick contact creation so click on create so as well as you already have girls we need to get our screen because we need to display something to use it okay we'll talk about this header and footer for now we'll get all our input fields so we need to user has to type some input text for first name last name and email so to do that we need to get our input comments here so I will get all of them as text first name this is for first name this is for last name and one for email and I will name each one of them first name last name and he made you can make them required here something like this yeah so whenever you create these inputs are screens Salesforce will create respective variables over there we'll come to that if you even though if you don't understand one I worry about it we'll discuss about that now we don't want all these three buttons we still want to the because user needs to click on finish on next so that he can create this contact so we need all the buttons but we don't we need only finish button we don't want pause and here's how to take them out so there is a control navigation here uncheck these two things and you will be having only finish method now we need to change the flow level that will be automatically change if you give D scheme here we'll make it as quick contact yeah and I think that's all here your per unit even you can use email input component etc you can also get phone here so for now we'll have only these three pins and click on then I think we are done with our quick contact screen and correct with start and you know what we need to click on save make it as quick contact screen flow new screen simple and screen flow is started by default to concept now we have our already it's in inactive status we need to make it status by going to flow detail page so it is taking us to the list this table flows page now we need to navigate to over respect to flow click on that it will take us to the flow detail page scroll down and you will be created whenever in your throw is created and click on activate now we have our flow ready so what is this step two we need to go to that respect to page to add up flow how it's the same matter that we have done in our the previous scenario click on this and click on edit page so that it will open the respective page with all the existing components we need to get our flow so on the Left panel scroll down to get row to add any flow we need to get the flow component so which flow is we need to select it how okay we gotta flow now in the right side panel if you see greeting presented by default but we want our quick contact screen cool okay now click on save it will ask for us to activate click on activate and assign it as God before click on next save now go back to reckon page to see whether our quick contact page has been reflected here yeah actually we don't know we should have taken this award over there okay we'll take it better now first name last name and email I will give some values here something like make each week on way we don't she contacted eight Tests come and click on finish and you know what contact will not be created why why because we haven't written any logical that we just created a screen prove it three elements so finish will not do any job over there our flow ends up with that screen we need to insert that contact so that is something which we are missing now okay with this scenario will learn how to add input events in this strange book similarly we we can put upon thieves or checkboxes radio buttons extra tracks extra okay we'll go ahead with our next scenario this page is not creating contact of course contact should be created when user clicks on finish button okay whenever user enters first name last name and email and click on finish we should insert contact record into the database so how to do it we'll go back to applause and we'll check it click on open which will take us to the flow builder page and this is our screen where we got first name last name and email so we have this button on ticking on this finish it should insert records finish button will not do the actual job the only job of this finish is it will take us to the next screen let's say we add another element on the screen here another element here then it will be called so this element whatever that we are going to add should insert context that's how we need to add so if you see me left and you have create reports you have update record you have get to cause and delete records so to perform any kind of DML operation we to get one of this element you know case we need to insert records that's the reason may God create the conscious element now when I will give some level and insert contact and how many recalls we are going to insert so user provides only custom last amendment we are going to create only one now how to set the record please please in a sense contact is per contact we have many pins out of which we are setting only first name last name and email so how these variables are getting from we are getting from screen variable screen data so screen data will be stored in resources so that is there is you need to select this use separate variables or resources or little values all the screen variables that we give to the UI will be stored in the resources will it come to that so as the screen variable stored in resources we are checking this now create a record for this object which object of course it is contact now we need to map the fields so contact has first name contact so first name has to be associated with the value that we enter all entered on the screen so we have screaming nents out of which we have even see on the screen unless I find first name the same way contact last name should be mapped with screen elements last and if I scroll down screen elements here so screen invents we have email screen underscore screen coverage we have email like email last name and first name so I will add one more which is email and if I search for email yeah so on the screen comments I have email click on it now whatever user entered are stored in first name last name and email we are trying to map we are trying to map the contact record first and last name and email and finally they will be inserted so once it is in inserted it is asked in stored contact ID in available so once the contact is inserted it will generate the Salesforce ID something that 15 digit ID this is a counter to basically contact ID in period 0 0 2 so that ID it is asking whether I want to store that where somewhere but really we don't want to be in our scenario so we'll ignore that now and click on them now we have our insert contact is insert contact will be called after user picks won't finish so in the screen we have finished button that we need button whenever user clicks on the finish button it will call this insert contact insert contact is having the mapping so user in the first name last moment email will be map to Qt respect to contact it's so we have our flow ready so we need to click on save as and we'll take this off so that it will just down through contacts the flow level is the one which will be displayed on this screen ago now I will change this value remember that psychopath technology order so you need to give proper descriptions here so that you will understand in the later stages added insert logic this is enough click on sip and go back so its inactive we need to make it active of course go back to see our flows list also Cody tail head and if you see this is our second version which is having adage insert added insert launching can't reconnect it now our flow is loading completely ready we already have our account page just refresh it we should be seeing our quick contact yeah the only contact I have remove the screen : that's leavin it's not appearing now when you try to give some values some name here and then see if it is great enough Reiki torchic on JJ s dot-com and click on next finish and when someone's in this place next because there is an element over there so we have a contact is created but why it is not displaying here let me see if it is created in the first place we'll go go to the contacts tab and if you see there should be an a contact created vegas chicken but why it is not displaying under account because we have mapped so for a contact to be mapped with an account we should be having account ID of that contact should be populated let's say I open this contact and I see and I see first-name lastname here along with email ad but I haven't associated that account I have a map in the first place that's the reason it is not displaying here with the scenario we learned how to create a record from screen from the same way we can create any custom object record and any standard object record okay we'll go through the next scenario scenario file contact is getting created but how to associate with the accountant okay so to create a contact and associate with an account we need to have the account ID of this account how to do it so in this page we have added overflow and we have our account ID account here so there should be a wait and there is a way that this page can send its account ID to this flow so that flow will be having access to that ID and we can map that into the respect to flow how so that is something we'll look into it now so we'll go back to the same flow and click on open and it will take us to the flow builder page where we will open our mapping now if you see if you scroll down with how three mappings first name last name and email so which has been entered by user but account ID is something which user will not enter but our page layout or Salesforce page note has an option to send its account IDs ID to this flow so let's say let's assume that it is sending the value and we are storing it in some variable so we'll create a variable to hold that value so we'll create a simple variable saying record ID always give this same name whenever you want a value to be passed from page layout to a flow so we'll create a record ID and type in text and and remember mark this active always available for input is something which tells Salesforce okay there is a variable called record ID which is waiting for your input so you need to set a table before you input only then we can make this work now we have our very and we'll go from good to nothing yet and give that label here recording yeah I recorded it so we are mapping a record ID value to that account ID currently recorded it doesn't hold any value we'll wait we'll wait and see how it works click on done and save us so let's top it is same our user will enter three values first name last name and email and it will go to this page and it will map all those three pins along with record ID currency record ID is empty remember the code ID doesn't have any value and click on save as and associating account ID with contact after econ save go back and we need to make it active scroll down and make it active this is our third one the last version now so how to send that value how to send this account record ID value to this flow so click on edit page again this is something interesting which we haven't seen before and if you see what is the conduct coming if you click on the floor the city magic scroll down and this is something which was not there before and campaign if we are magically how you have created available with record ID and make it available for input available for input has seen the equation and has got this so which says past record ID into this variable which variable this is our variable that we have created in off flow this record I read already check this and this is the record dot ID which is this account record ID account record I account record ID will be this one and we are trying to pass that value to available you and from there the mapping happens in off flow along with first name last name and email our mapping will walk with account ID as well and a contact will be created and it should associate with our account well it does this refresh this page and we have our screen give some values you've test contact one.txt contact one at the gate test come and try to give different values I have created Vegas you can't area now I am giving different values why because there is all your default to bigoted chicks so if you give it there will be an error displayed so click on next and you see a new contact has been created or laugh with the scenario we learned how to pass record ID from record place to flop we send an account ID from the record page to the flow so that flow or has taken the idea and then associated with the contact scenario six yang but contact should not be created if there is any duplicate contact found how to do this ok quite simple ok first we'll see how suppose duplication works so I will give same text contact one again and test contact one at the rate test calm and if I click on next it will give this kind of gear than other cells all those cute little boils in Salesforce team hasn't fixed itself yet so it still shows this kind of vague message will not understand what exactly it means so we need to we need to write our own logic to to create contact only when there is no duplicate value so how so we will go back to overflows again and click on open save run and it will take us to the closed page so close builder page and user enters create first name last name and email here and we are directly inserting it so between use I mean after user and person before we insert the record we need to check if there is any duplicate I mean if there is any contact which is having same as name last name and email if there is any we shouldn't insert it if there is if there is a contact if there is already duplicate value we will leave it that self so we need to write over a door elements here to point it to the gates how we will find we need to query it qualifies we need to get the existing records so we'll take this in the first place because we need to add a couple of comments here it's an easy process get-get your quads here so what we need to get get duplicate contact yeah and if I scroll Owens asking her which from the top cause it is contact the con contact and scroll down on what condition on what condition you are asking me and in what context I need to get it it is ask for contact you should get it so we asking if first name matches with my screen element first name so user is giving some a stem here we are just putting in for a screen so lastname equals screen last name the value entered on the screen and email or contact matches with whatever user has entered on screening me now we are in we have given can in something like select the contact records which are mapping which screams entered was them asking at the last minute you should include a melody it on the screen now if we scroll down it is asking whether we need to get only the first record of course one record if we get one record itself it says okay there is at least one duplicate record so we will leave this option where to store this field values so we are asking to stroll to a record variable example eye contact record has been queried we need to store that variable somewhere so I will create a variable to store that duplicate contact if one variable and I say duplicate contact and make it type record we don't we are not taking it as input and also leave these values and object contact and processes of contact object now click on done scroll down and give that value to be net content okay now if you see it is asking what are the fields I need to store it in that variable ID itself is enough we don't need to worry about anything else and you see this is really important in our case check this so when no records are read on set specified variables - none which means if the if we run this query with getting all the contacts which are mapping with your first name last name and email store that in this variable if it is not count let's say there is no contact with your regular customer mask in an email ID give this with modulus value with null with malli so which means if there is value null in this record variable which means there is no do we get in the first place if there is a value and this duplicate contact that means there is a duplicate value very simply so this is really important because in the next step we are using this so click on done so we got over to be get contact softer quick contact screen get a we are querying the contact object to see if there is an Interpol gate so if there is any double gate it will be stored in this variable to delete contact therapy now we will we need to insert contact only when D when there is no duplicate so we need to have an equals equals condition so to have it first condition we need to have this decision box well say no duplicates or duplicate contact phone okay so to me we will have if-else condition so tool that will say yes do we get contact will have some value when a query returns at least one record now we'll say do we get contact he is null is false is null expanse which means we will get contact he is not nothing yes which means there is a duplicate value well we may make it as no again which means we'll also give to bigot contact condition says he is none true so if this condition matches yeah if duplicate contact is null which means there is known to be read in the first place to get contact in nerve which means there is no double gate in the system so will be con done now we'll connect this to our decision box so once our query turns some value we are checking if we are actually taking if-else condition now we we will current this to our insert record when it should insert record you duplicate each if you get is not wrong click on no then now if you see - we get contact form if there is no do we get form which is no then we are inserting it so will you just discuss what we have done so far user will enter some values sofas name last name and email here and with those three values we are quietly if there is any existing record and we are storing it in do we get contact variable if the do we get contact variable is now then we are saving it in our we are creating the record LS we are leaving it as it is very simple well click on save as to save this version and do check click on save now we have our floor ready built as this out they press this page if you make it active no not yet so go back to our flow scroll down to see of our pure page scroll down and make it active so we have a workflow ready now we'll go to our account page refresh it again and we will see whether Dubcek is working as expected so first we'll create a simple record which is having a different value test contact to test contact to a tier 8s comm so I am giving a different value which means that there shouldn't be any contact with the same name so it should create it under the same account click on next so if you see contact to has been created under this name now I will give the same details test contact you again and it should not create any contact now but it should not even give any error because we haven't added any error logic over there so test test contact when Toby is trying to replicate the same contact and it should not give any other and at the same time it should not create it so it hasn't been created with the scenario we learned how to query records by using gate operation and we also learned how to add decision box ok we'll go through the next scenario oh thank you but can we display contact created or duplicate contact for messages after user clicks on finish of course yes yes yes cuber said we really need messages here whenever a contact has been created it should display that and if there is a duplicate phone it should display the kind of message or them so how to do it so this is very similar to scenario 1 where we have displayed hello world message in the same way we'll add our messages here once we inserted a record so how to do it same drill get our screen and add it here and we don't need harder we need footer of course we'll come to that but we really don't want to get some pause buttons we will offer others previous and boss and we have to display message which is will scroll down scroll down and get our display text and we need to add contact inserted success link and ap name is success message okay and we'll make it bold to do that select it old and 20 yeah and the con ten now we need to click on screen give some name here success screen and click on done so we have our message ready and it should be called after insert now once our contact has been inserted our message will be called very displaced contact inserted successfully let's say there is a duplicate pound so we get found then we will display a message saying that that we get contact exists so same drill remove the header past and then footer I don't want false and previous so scroll down and get up display text and market as 0.2 placate contact and display - error and scroll down select everything hold 20 scroll down and make it yeah I'm going to cutie name for screen as well dupe check cell Duke screen and scroll down scroll down then to contact yeah and outcome is yes of course so if do we get contact phone if yes then it will show this too we get screen where we are distinctive we get form and if propagate is not found we get is not on it will insert where code and finally it will go for the success display screen so this and this are last elements in this flow Idol this will go 1 2 3 4 & 5 or less it will go for user on the stator do we get we get check and if it is there is no we upon it in sirs and then it will display the success screen so one flow and second clock okay having been said that will save as and make as messages add it and click on save and one last step go back and we need to activate it well go back to the screen scroll down and activate it and if you see a I have been adding descriptions to each and every flow version so first we have added new screen and an insert logic associating context so if you add this kind of descriptions you will understand what modification you have done in that update now we'll go to that account and we'll check whether our messages are really getting displayed or not this is a reckon page we will test it out will create a new content which is a not a duplicate one let's contact 3 just contact 3 the expectation of this is it should create a contact and it should display us a message the contact inserted success but it is not displaying equai you need to click on finish one only then the operation will be completed and a new contact has been created and that the quantity condor skin has retained its page see very easy now we'll give a duplicate value here test contact - yeah and test contact to a tier 8s calm and click on next it should give us the error oh boy - the contact on and click on finish it will retain its page see quite simple with this we have completed the intermediate level module so we have created a quick contact page where it checks for double gate and if it is not to be found it will create a report do we need process builder I understand flows are far advanced then why can't we just leave process builder and workflows behind and only deal with flows yeah I myself said closer more advanced than workflows and process builder but the answer is we still need process builder why because even though for flows are more advanced flows cannot be called directly when a record is inserted or updated unlike process builder so we call flow from process builder which helps us to do complex actions on insert or update of a record example let's say you want to you want to send an email whenever a record is inserted or updated you can directly do it from process builder but this is not the same case with flows I will explain it better with an example ok you cannot directly call close so let's say I want to do a mass send sending of emails let's say I want to send emails to multiple people at once process builder cannot do so let's say whenever a record is inserted or updated I want to send emails to multiple people I will I will call process builder first let's say whenever account is inserted or updated I will call process builder and from process builder I will call flows where in flows I will write my logic to send emails to multiple people will have a scenario cover so that you will understand it better ok I want all contacts should be deleted when account status is updated to inactive is it possible ok the is the perfect scenario to understand why process builders are really needed for our flow so flow cannot be called whenever Ellicott is inserted or updated so first we'll try to understand what flow humanity Y is asking so we'll open any other account so open another account which has as force as force another contact which is having two contacts here so these contacts are not related two cases that is the reason I am picking this account okay no queue boy is asking us to delete those two accounts whenever a user changes the value from active to inactive so active status to know so if user selects value no and click on save both these records has to be deleted that's what his requirement is how to do it so whenever account is inserted or updated a trigger can be called a process builder can be called a lever flow can be called a flow cannot be called that is the reason we will leverage process builder ability to call our flow tax will go to the flows and we'll see how we can create a flow to delete contacts okay scroll up and we will go to applause and scroll down and click on new flow and it will take us to the flow builder in this scenario we are dealing with a back-end logic where we are deleting the contacts you are not showing any custom screen to user and moreover process builder cannot call screen flow it can only call or to launch clock remember process builder cannot can only call auto rajma so click on create now what is the what is the process that means we need to delete the contacts so click drag and drop or delete records delete related contacts now we need to specify the condition what context we need to delete supposed to be need to select the object contact and what what condition we need to give here so process builder assume that process breeder will send the account ID so whenever a record status changes from active to active status changes to no this process builder will send a wreck or that account ID to this floor so this flow should delete all the contacts which are matching with the account ID now we'll provide the account ID and equals two we'll create a new resource and you create available something like account ID and listen is this account ID will be populated from process filter so process builder will send an account ID whenever I record accounts record status active status you change it to no so data type should be text and available for input only then the process filter can send account ID value to this variable done so this basically means delete contacts delete contacts where account ID is equal to take even account ID this account ID will be sent from process filter so click on then and correct start with deleted contacts and you know what we have done we are done with the workflow click on save delete related contacts flow an order launch boy selected here click on save it will be in active status of you already know go back and make it active so it will take us to the flow page scroll down click on it and make it active now we have over flow ready to go but we need to have our process builder to call this flow so we'll create process build up a new process process we'll have it on you now so for people who never worked on process filter I have already created a video for it I am adding a description down here or you cannot click on the icon on the right top ok will create a simple process builder the ship your account why because whenever account has been updated which means the process has to be on account so you can't insert or update okay scroll down and process starts one record changes record changes it can be whether account is created or updated click on save now we have created a flow we need to select the object I will select count whenever a record is created and edited most it will be in edit case so whenever a record is edited we are calling this process builders on what condition is in active so even this should be having meaningful names for this element so that will understand it better so what is this condition this condition say is active PV active field choose it less value choose from no and click on save so whenever account record is inactive which means active will be set to no then we need to delete all the contacts how we are deleting we already created a flow to deleted so we will call and flow from here so this is how you need to call your clock so here it will only show thee order on so it will not show these people that's the reason we have even though we have created two other rows it is not something here so select overflow and then this floor is X expects flow variable so we have created account ID right and it is available for input maybe we need to send the account ID value here so pre difference so this process builder will have a reference to account on sheet come to sleep so this account ID in flow should be populated with the account ID such for ID and you would be saying somewhere town account ID and click on choose so close account ID will be populated with the account ID if that process will that has access to process builder will send the account ID only been back active status is set to no give some name to this action calling delete contact flow and click on sip very easy see so on account object when there is an update happens with is I in active whenever active status changes to know we are calling - flow that flow will have the account ID from this process builder and that global delete the records that we already have created and we need to make it active the same way we are doing it but process builder has an ability to active then me it was a builder page itself unlike a flow okay we have our process build already and we are set to test how can we have a process builder now we will open our sales as force account these are the contacts that do not have any association with cases so I will open the detail page and I will change the status to no active status to no and you can save the expectation is contact should be deleted scroll up and click on related and you see context were deleted this is how you need to do it I have a doubt you boy what kind of name is who named you cuboid I always tend to ask too many questions to my parents so they make you by well I am not surprised okay guys that's a wrap up if you liked the video give a thumbs up and if you want me to make any video on any topic comment down below yeah and finally practice practice practice and happy learning bye
Info
Channel: Salesforce Exclusive
Views: 84,431
Rating: undefined out of 5
Keywords: learn flows with real time scenarios, learn flows, lightning flows salesforce, salesforce flows, process builder salesforce, salesforce process builder, visualflow salesforce, flow builder salesforce, salesforce flow builder, admin, process automation, workflow in salesforce, Automate business Process, flows salesforce examples
Id: O0I-h1fbVGQ
Channel Id: undefined
Length: 52min 40sec (3160 seconds)
Published: Wed Sep 11 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.