Mastering System Data Management with ServiceNow: ServiceNow Delete and Update Jobs Explained
[Music] hi all and welcome back so in today's tutorial we will be looking into One More Concept which got introduced in Tokyo release which is system data management so consider scenario what is the most scariest part in your day-to-day activity which you which you are pretty scared of if you ask me the most scary part for me is like when I want to do some data cleanup or when I want to update certain data in the production instance right it scares me like anything because I'm not pretty sure when whole home the data will react if certain mistake happened during that particular point of time then there is no way to recover the data out okay yes definitely there is a way to recover It Out by going to delete records and all those things but that's not a efficient way of working right because it may lead to a lot of escalations and the second thing is like the script for the same so you must be thinking whenever you want to for example you want to do a bulk delete off work update right you should have to be very cautious about the scripting for it right uh you can't believe you can't delegate this particular think to any of your Juniors because it it's quite risky as per my uh experience okay so in today's uh tutorial we'll be looking at the capability which was provided into Tokyo it is and I I'm using it on a daily activity which is system data management using that this particular activity what you can do you can up if there is two things underneath it and we'll be looking into the same update jobs and delete jobs so using this what you can do you can bulk update or bulk delete the records okay based on your requirement so let's look into the definition for the same so if you go to the system data management you can see there are two things delete jobs and update shops okay so let's look into two use cases in one use case we will be bulk deleting certain incident out and uh in one use case we will be bulk updating you know and I will be showing advantages of the same also during that tutorial so let's go to my favorite favorite incident table pretty girls this particular table is familiar to everyone who are working on service now so we will go and let's work on the delete operation first so for instance I want to delete all the incident okay which was created by debit okay debit with David Miller and which were in the state closed or new okay let's go why you want to delete it the data which is closed is closed it so we will consider new so consider a person whom your company just kicked out okay he created some random incident okay just to bother you out okay and you just want to do the cleanup for the same so for this particular record we want to do the cleanup so how you can go for that so we will go to date not SATA Theta management system data management and in this I will just go and open the delete one so this is how the interface looks like it's like data management Elite jobs okay and if I click on new so this is how the interface will come up this is introduced in Tokyo so if you are using previous delays just upgrade it out okay now puta is also there now this is how it looks and now first and the foremost thing what you have to do is like you have to define the table on which particular table you have to do so I'll be selecting incident over here why incident because we have to delete the record on that then we get a related conditions okay condition filter over here so in condition you can Define on what particular records you want to act upon on what particular records you want to to the delete operation in this case so I will just do call the is and you get dot work also which is pretty amazing right so caller is David Miller I will just David Miller and what was the next condition and will give state is new okay now I will be showing the advantage of it you can keep on adding the condition okay but the only factor is like dance condition should be relevant with respective instrument table then I will save it out you can see a checkbox over here right run business rules and engines if this particular checkbox is checked then what it will bring all the business rules which are written on delete operation right for instance those will get executed but I don't want it then then you can simply uncheck it out and the second is like you can schedule it out also so for instance if you want to delete records when no one is aware about right at the midnight so you can do that also you can just schedule it out and go to sleep this particular job will take care of the data cleanup during that particular instance of time but we want to do it at this particular instance why because I'm creating video right now right so you have to just I will just save it out okay this is First Advantage no scripting you can Define the filter you can schedule it now you can enforce the business rule and workflows executions also on the same the next benefit is like you can see the related list called preview casket what is preview casket then so let's click and see so as soon as you click on the preview Cascade it will pull out all the information pull out the information of all the records which will be getting deleted so it will be like it will you are cautious before deleting the data right that what exactly will get deleted so if I scroll down it's showing that c this previewed record count okay five records are there which are on Instagram and this table this records will get deleted let's verify the same so I will go over here and we have five perfect this is what we want so we have just we got the confirmation also that what exactly will get deleted and then as we don't want to schedule it out we have a button we have a provision for that also that you can proceed with it um delete operation at this particular instant only so I will just click on execute now and let's see it gives warning that is also good so it will you you will not delete something accidentally right and if you delete also then we will see what we can do so I will proceed and if you see it's running still running and the job got completed if you want to see what exactly got deleted right so you can go to check execution results and you can see this particular criteria got deleted this this thing got deleted okay and as you can see over here cascaded ones right for this record there was a general journal entry also six those cascading thing also got deleted isn't it perfect so it goes in the nested fashion okay now I will go back and let's see whether that data actually got deleted or not so if I refresh it out wow the data is gone so it got deleted now again come back to this I know you are already pretty impressed with this but one more thing is remaining for example after you are getting the pop-ups uh you got a confirmation message okay you got a soft confirmation that wardrobe records will get deleted in this related list still you made a mistake and you deleted the record and you don't you want to revert it back so you have an option to do that also okay so you can see there is our option called rollback if you click on this off this particular button it will reverse the entire process okay so let's do that if I click on roll back it will I guess ask for confirming How Sweet It Is that are you sure you want to roll back it out yes I want to roll back so I can do it entire day and night right so you can see all the execution got completed we'll go back to see whether we need to drive the data or not so I'll just refresh the filter out and you can see if we record the five date five records again in the similar way it works for update also so let's consider this set of information only and now what do I want to do that I am I am working on all this incident right so I want to assign this to certain user assigned to a certain user and also I want to change the state to in progress because it's called assign so how you can do that let's go back I will go to all I will go to data management system determinant and you can reuse it the way you want right okay system data management and this time where exactly are recording okay this time we'll create oh we created the update one right that's why the data was not there so again I will select the incident and student table now it will ask for the conditions will again give the same condition that crawler is perfect and see it the automating system fails yeah this is also pretty nice right if you if you want to hide it from everyone right you can just uncheck this checkbox so what it will do it will not update the system refund phase right created created by update update by all those things okay and on business so I will uncheck I will keep this check now it asks what Fields you want to update so I will first I want to update the state two in progress one and I will do assignment group let's do a semic group only to take all the things on me select some A7 group let's give it to which group hard working okay and I will save it out so once you save it out we we got the details okay whatever required it is what the okay here you will not get the option right because it's update it will not impact anything you can just update it out again right so I will just click on execute now yeah update on record which matches the criteria proceed it got completed again from the history we'll go to the same incident record now you can see there are no records why because the filter is straight study state is New let's put the state progress and if I run this out you can see five records are there which the state got moved to in progress and the assignment got group got updated to Hardware isn't it amazing so this is very useful okay actually I was looking it's like a savior for me because that I do a lot of cleanups right so this is really helpful okay um hope you like it out and please try it out don't write scripts because we have tried to move to low code first and then no code kind of things okay so this is all for today's tutorial hope you like it out if you like it out please subscribe to my channel so that you will get notified for my upcoming videos okay till then stay safe stay happy and have a nice day thank you foreign
https://www.youtube.com/watch?v=Zbv_niGkMTM