ServiceNow Move Bulk Updates into current update set use case | ServiceNow update set tips and trick
foreign [Music] and welcome back so as a developer there are multiple scenarios where we make some configuration in this place and then we want to move certain sets of updates which are captured from one object to another update set okay in this case we will we usually open each a customer update record we want to move and then change the update set field to a required update set for example if I if I go to the system foreign [Music] let's create call demo demographics and I will save this out okay and then I will mark it as make this my current effect now if there is some other update right if if I go to local update set okay and if I want to move updates from example service catalog Builder so there are much data there is this update over here so if I want to move it to the my current update set what I have to do I have to just go to the update set which is here by default and change it out to some different update say probably the doctor said which you have created and this is pretty time consuming when you want to move a set of updates like 10 20 30 updates okay so this is not a reliable practice right so in this tutorial we will be creating a new action using which you can move multiple updates from different updates to your current update set so let's get started so first of all I will just remove this out and let's just go and create a new action so we'll be creating a new action on updates with paper okay so you can simply go to your action and I'll be explaining you each and every templates how exactly you can do that thing reaction will click new because we will be creating a new action we'll give it a name [Music] okay and the table table name will be giving as the table name which is subsister lies in table says update XML so we'll be selecting that table so I will be doing this that's good update XML so this is a table where all the updates that are stored okay now we want to create a link uh will Define action so we'll give the action name I will give attention this should be not doing move I will just give it more activation insert up to 80. and I want to make it as list choice so I will just mark this as this choice and then let's start writing the code so what you have to do over here I'll give the some hint also good button please bulk yes okay now this is done now let's just start writing the first and the foremost tip is like you you want a current update set reference right so for that what you have to do valuable current red set equal to JS dot get preference again she has not get preference and which preference so it says substrates it is that the second thing is like we'll Define account now the next step is like we'll be Gliding Over the flat records so what we'll be doing CR unchy online record and we will go with the same table foreign now we will simply add a try Gadget what do you want to try you want to do current dot set which will be the current uh updates it right at that particular moment so current dot set value we are doing what we are doing manually okay just setting the updates the same change except Etc we are doing it on multiple records now what we were changing update set timer to now as we are changing it manually to different updates right two we will be changing to the current updated now current dot update so over here what we are trying to do is like first of all we have taken the current update set okay Society will get the suicide out of this then we have just Define account just to get the count how many how many records we want to go okay then what we did we did the Glide record okay and just find a created an object of the current update set and then what we are doing whatever updates which are selected right we are just updating the updates with fields on that particular update to the current update set Society okay let's add catch also if there is an error key and over here we will basically clear start encounter and we will give it yes so whatever we we are getting we will get it in the logs and error message and we will give you can give your password that message for your requirements okay and if everything is successful we'll simply give it a chart message tab s What will the count thank you what how many upgrades migration is complete completed and we are done with the code so let's try it out now so let's let's take some foreign it should be empty because we just created this update set yeah okay it has one new action which we just created right now what we'll be doing we'll go to the local update set and let's try to find some updates which is in global application to Global application for example this get reference so it has multiple entries we can select multiple over here multiple records over here and then if we come at the bottom right if we get a we should get an action you can see the section or to current updates it right I'll click on this action and now if I go to the demo updates it as you can see all the updates got migrated to this time object set so this is how it's pretty simple now to migrate multiple updates from one existing objective to your current updates hope you like this video okay and hope do you find it useful and you can implement it your project just for the ease of migration of updates from one updated to other till then stay safe stay happy please do follow my channel to get latest updates for on this kind of videos in the future This Is Us
https://www.youtube.com/watch?v=00Qxf8e5gkw