#6 How to create and update records in ServiceNow with Flow Designer | Flow Designer Training
[Music] please subscribe to my channel and click on the bell icon to get the regular updates of my channel and do not forget to like comment and share hello everyone welcome back to sas with servicenow this is part of servicenow flow designer training in this video you will learn about creating and updating rackets in servicenow with flow designer and that is also without writing a single line of code as you know if you have to create rackets in service now or update rackets when any particular racket is created or on any particular action or any event you always need to write code maybe with the help of business tool script includes server side code but with the help of flow designer actions you can create and update rackets without writing a single line of code so let's see how you can create and update rackets in service now with flow designer and this is my personal developer instance now i will do one thing i will quickly open floor designer so this is flow designer home page now i will create a flow in order to use that action so i will click on new i will click on flow and here i will mention demo flow and then i will just click on submit so that i can create the flow so flow is created now i will basically add a trigger so i will go here i will select created so what we will do we will create or update rackets with problem brackets so here i will select a table so that once that racket will be created in that table then i will take some action maybe create brackets or update rackets so i will select problem table so i will select problem so that means once problem bracket will be created this flow will be triggered so i will click on done i'm not putting any filter but you can definitely add filter as per your requirement so i will click on done and here i will select the action so i will click on this click on this here we have servicenow core and here you will find lot of different actions out of the box actions from servicenow so here for creation and updation of records you have these actions like create or update racket create racket separately you also have create task which is basically to create task brackets not any other type of racket just task records and then you also have update racket separately so you have create or update racket create racket create task and update record let's read what exactly those actions are so here we have create or update rackets which means create or update a record in service now table by determining if it already exists that means system will automatically decides basically that value will auto collate is already applied and it will check whether i should create the racket or i should just maybe i should just update the same racket existing racket so for that you can definitely use create or update racket we also have create racket separately which will just create racket in any table you want and it also says that server side validations rules are enforced data policy business rules dictionary defined mandatory fields but not ui policy and that's for sure because ui policy is is for ui then we have create task now this is specifically for servicenow task table so you can create a task record in task table any target like incident change problem all those records which are inherited from tasks table then we will also have update racket which will automatically update the record as per the table you will select any table you will select but in this case what we will do we will create two problem task records so i will go to create task let's say task first so here i will select the table and that will be problem task and i will select the field values so here i will put field values and i will mention short description i can mention this is a test for create or creation creation of prb records then i can just add another value now how this this particular action will come to know that i have to tag i have to basically link this problem task which we are going to create with this problem problem ticket created so for that you definitely have to select that field that is problem field so what i will do i will use this data pill so i will click on this i will select this and i will select this problem bracket that means whenever this problem task will be created in this field this value so this racket which is getting created and which is also triggering this flow is basically populated in this field when this problem task will be created now one more thing you have you can see we have this weight now this will wait for the next action so if you really want to wait for next action that until this is created i should not go to the next section you can you can definitely select this particular check box i'm just not doing this right now and then so we have shot description we have problem if you still want to copy some data from this main parent problem bracket in your problem task so what you can do you can definitely select like this and select any field you want which is already available on problem racket as well and then you can just click on this data pill click on this now this will take you to this problem bracket and here you can select the fields which are available in problem table and you can select let's say we have this assignment group i can select this so what exactly it will do if you have any problem uh in this problem created with the the problem record which is getting created if it has any assignment group then that will be copied here as well so i'm just leaving as is then i will go to next one so now as i told you i will create two tasks so here i will select this one now and i will select this time create record so i just wanted to select both the actions so that you can understand the difference so here i will select create racket and here you will see that i'm not getting that weight check box because this is just creating a dynamic now why we we have the checkbox for task because you always want to wait because and even in workflows you definitely whether you want to perform some actions once that task is completed that or maybe that task is created then only you want to perform any other action that's the reason it would wait for that and that's the reason you have that option but in create bracket you can create any record in any table you want so here i will select a problem task again i can definitely select that so you can see i can select problem task as well in this and the different action and here i will select the fields short description uh this is a second task and then i will select because i have to link problem task with problem bracket so here i will select the same this this one and i will just select this one that's it that means this problem uh problem will be uh basically linked with this problem racket which will be created now i'm not going to copy the assignment group because i just want to show you the difference that what kind of difference we will see between these two actions so i will just click on done now i will also try to update racket so once this will be done that means once these tasks will be created i will also show you that this would also update so i will come here and then i will maybe i will do one thing i will put a condition that if or maybe i will put wait for condition i think uh we have not talked about this wait for a wait for condition uh but you can you can definitely use it and you will not find in flow logic you will find here wait for condition now this is something if if basically if something is getting changed you want to wait for that condition for a particular record now which record i will select from here and that will be the parent record and i will select that one and you can see it has automatically selected table now it is asking me for the condition and in what condition i should wait so what i will do i will select state maybe state and here i will put maybe in i think i can just mention root cause analysis if state will become root cause analysis then and i will just click on done here and if i show you other options you also have other options like enable timeout you can also select the schedule we will have a separate video on just wait for condition so i'm just i'm just selecting this action just to show you that how i can update the rackets as per the condition so now here i will go to action this time i will select update racket not create racket so i will just select update record and which racket i can so here and i have already told you this data pill picker is really really powerful because you can select any previous racket any previous value which is getting created so in this case i will select this maybe this task so in this task when this task will be created i want value to be changed what value let me change short description so this is after weight condition now why i'm putting this value just to show you the demo just to show you the practical live example so that you can understand that what exactly happened whether we found the same value or not so so that we can validate it whether this particular action worked or not so what we will do we will change the value because we will make the state to root call analysis and then we will see whether this particular task which was created whether its short description value got changed or not so that's how you will understand that how exactly this creation and updation of task works updation of rackets and tasks so i will click on done and now i think i am done so i will just click on save and i will activate this flow which is really important you can also do a test with this test and but but i think if you want to directly use it without clicking on text test then you can just activate it so i'm going to activate this and as you know the triggering condition is when problem is created so i will just wait for i think it normally takes time i think you will also feel that difference but i think uh i think in cubic version it is a little bit fast and i think that's what i have observed as of now we are in paris version so now here what i will do i will go to problem problem application so we have here i will create a new problem bracket by clicking on this create new button so this will open up the problem form so i got this form and here it says problem statement so i can just mention demo i can just mention demo for flow that's it and here we will put the assignment group because we want to test that because we are already added to copy to to copy the same assignment group in problem task as well so what i will do i will select assignment group that's this analyst one so i will select this analyst one and now i will just click on save once this will be saved that means this problem is created and if i go to my flow and if i click on execution you will definitely see here that this flow has triggered and it has queued up basically and i will click on this because now i do i want to see what what exactly it is doing okay awesome you can see it it basically triggered here it created the task it created the another racket basically same problem task record and now it is waiting for condition which condition i can expand this and you can see it is waiting for the condition so what i will do i will just go to problem here first i will reload this because i want to see whether problem tasks were created and linked to this problem or not but before that i will go here because i want to show you what kind of racket it created so click on this you can see here it created this one this problem task if i click on this you can see it created second problem task how can we see that whether it got linked or not i can basically you can also see it here you can see this problem and you can see this society and if i come over here go to the bottom absolutely you can see you got these two problem tasks created and you can see this short description this is a test for creation of prb records and this is a second task that means this one was created with the help of the first action we used and this from second action now we added third action what was that for update of records so in that case what i will do i will click on ss that's my next state so maybe i have to assign it to someone as well so i will assign it to someone we don't have any user um i think maybe i will create one if i can add let's say test i think it can okay okay i'm able to assign it to this user i'm just doing it for testing and then i'm just clicking on save and then i am i think it is in ss mode then i will just click on confirm and you can see that basically state got changed to root cause analysis that's what we wanted that was the weight condition for our record and if i come over here if i refreshes if i refresh this you can see now third action this one also got completed even this action as well wait for condition because this particular flow execution got this condition and then it basically moved to this particular action which is to update the racket how can we find out whether this basically completed successfully or not you can just come over here reload the form and you will see the updated short description of your problem task one problem task if i come here you can see absolutely we can see this is after weight condition that means our both the action they were they were basically they ran successfully without any issues so this is how you can use different basically different actions like create task create racket update racket create or update racket in order to create and update records in service now and that is also without single line of code as you saw i did not even write a single line of code let's say just just to quick thing that if you will get this kind of requirement you will definitely write a business rule or some some other different scripts in order to achieve this kind of functionality however you are able to achieve this functionality without writing code and that's a really great feature of flow designer if you think that i'm able to enhance your servicenow learning experience then please do not forget to like and share and comment on my videos thank you for watching and have a great day
https://www.youtube.com/watch?v=sXuKaV9aSNQ