logo

NJP

ServiceNow - Create and Delete Form Overrides in a Domain Separated Environment

Import · Aug 27, 2019 · video

my name's Jason Miller founder of Aspen a solutions we're about to unlock the power service now I like to start off by thanking all twenty-three hundred and fifty-five subscribers in over 80 countries globally if you believe in transferring knowledge to those who need it most please click Subscribe your user data will not be transferred to anyone outside of Aspen now without your consent welcome back everyone today before we get started I just like to mention that Aspen now is now on Instagram trying to integrate a little fun into the learning process and hopefully provide you some cool imagery from where I live which is Miami Florida today what we're going to be talking about is overrides for forms and a domain separate environments so what is an override and before we get into it let's just take a look at our domain hierarchy here override is basically a way that we can tell parent domain that the child domain is going to do something different in terms of the way the form appears on the screen now overrides can also take place with business rules client scripts UI policies etc they're most commonly a a little bit of a nuisance though especially for people who are just getting started with domain separation with the forms so I just want to show today how we can create an override in a and on the core company table and then what we'll do is we'll clear it out and then you know do that maybe a couple of times so that way you can see the methodology here so as you can see here we have a couple of forms here and different domains on the core company table so right now I am in forms and the way to get there just type in forms here you'll see here system UI and then forms so we'll get to this in just a second but we're going to go to the core company table right now as you can see I have one open but in order to get to the core company table type in core company and here we are and then we'll just select one here we'll notice here that I'm in the global domain fantastic alright so right now we have it looks like override going on and customer a and top Acme so and also top for that matter too so out of the box everything is going to be at the global level and then the onus will be on you to create overrides probably on top or I know some people work at MSP but generally in my experience I work on top domain as an admin again this will be up to your organization on how you function in terms of where you work as developers so if I want to create an override pretty much what I'm going to do is I'm going to go to the form here and then let's see where do we have them customer a Acme top alright so maybe I want to create one oh I don't know let's go into maybe this customer C and let's see if anything changes here alright looks like that's what's that the same I don't know let's take a look here let's go back to let's go to customer a and see what's a little bit different customer a appears to be the same let's go to Kingfisher and it's good to toggle these sometimes just to see what what exactly is going on okay so I don't know Kingfisher maybe will try to create a domain override there so I'm going to go into form layout and sometimes you're going to do this by accident and here's why as you can see here and for those of you that work in several tabs at once I apologize for the brightness here let me see if I can get this see if I get the options here try to run the brightness up okay that looks decent alright so what I'm going to do now is I'm just going to create almost like an active field they're not creating but adding too I should say and I'll put the country country underneath there then I'm going to take out these three now we'll click Save and now what you're going to see here is that we have a business rules that run and it's going to tell you there's a new form section here and it's overriding kingfishers and then we have let's see a new form and form section so it looks like a whole bunch of stuff happened and if it's your first time you're probably gonna freak out say okay I'm not sure what I did or you're not going to freak out and then later on someone else is gonna freak out when they say hey where'd all the stuff go because the form looks different so now if we go up one level to MCT which is the the parents of Kingfisher and give it a second for this change we'll see here all this stuff came back right and we'll notice our countries in here the active isn't there etc so what are we going to do now well we're gonna go and try to find it first and the way we'll find is we're going to come in here to form so we just were and what I want to do is I'm going to collapse this and let's do this again it's click on forms and remember our go-to move and I mentioned this in a couple other videos I think on domain sup our go-to move is Oh is going to be to go to global if we can if we if we know the domain where the override was created fine we can go there we can go find it but probably the the best way to do it is to go right here to expand domain scope and sometimes and you'll see it right here there's kingfisher sometimes you can do just sort on created because you know maybe one of your colleagues will come to me say hey man I just I don't know I think I mess up this forum or whatever say okay always have this created column in there so that way you say okay well the last one was done by and then here's who is done by and when so it looks like we have this customer account right here it looks like it's overriding the other one on the or excuse me cut you know the override name is customer account so it's going to this the same table right here right so at this point what we want to do is generally you can clear this thing out if you want to all right and now what I'll tend to do is even before I clear out that override is I like to back these things up sometimes and the reason why is because maybe I killed the wrong one and if I killed the wrong one that's gonna suck because I don't have to redo all that work but in fact let's just go into one of these forms and see what's going on here because chances are the form is gonna have some form sections that go along with it and sure enough here we go we have our form sections too and even if we let's just say we go into one of these things it's like oh I clicked on the domain I don't want to do that I want to go into this sis UI's section here I believe alright now we're gonna see here see how we have another related list call form sections that kind of throws a monkey wrench into things sometimes for people and that there are actually two tables named form sections so if we take a look at right here we're informs we can tell right there sis UI form but then we're gonna have sis UI section right here and then if we open this up in a new window sis UI form section okay so yeah basically this is a way to recycle the sections it's kind of what a you know the functionality appears to do here so I'm gonna expand this domain scope you see how all that stuff just appeared right there okay so that that right there shows you that like you could even be in this form section right you're gonna see three you open up in the next list there was nothing there but now when you expand the domain scope you're gonna see there are five actually okay so at this point what do we want to do do we want to get rid of the form altogether or do we want to get rid of the section okay so I'm gonna get rid of the form but before I do that I want to back this thing up so I'm gonna right click on do your show matching on kingfisher we'll see I have here three and then the table I want is customer account not incident or a problem so now if I want to back this up I'm going to do is export to XML I want to click download throws it down there nicely remember when you're backing stuff up if this were to have stuff in the related lists you're gonna want to back that stuff up too so all this crap here and then if there's anything in the related list for these then you want to back those up too I know it's kind of a pain that's just what I do you don't have to do it it's fine so now I'm gonna get rid of this thing I'm gonna hit delete okay so now let's try to go back to or see if I can find that form here all right looks like yeah here we are I see a customer account I'm gonna reload this and we'll notice I'm an MC teen out on Kingfisher so now if I go back to Kingfisher let's see what probably nothing happens just yet I'm hoping anyway all right thing going to move for me country's still here active is still here one more thing we have to do we have to run cache cache dot do now it's going to clear the cache and you have to do this with UI related stuff I guess is the way to put it but specifically for today's lesson you're gonna have to do this if you're working in a domain separate environment with forms and form sections that are messed up you're going to want to clear the cache and now when we come in here let's pay attention to country and active go ahead and refresh this and voila we'll see here looks like we don't have country anymore and everything was turned back to its previous state okay well I think that's a good lesson about overrides and how we can you know basically get rid of them or at least the unwanted overrides that we accidentally create in a domain separate environment if you have any questions feel free to go to the YouTube page in the About section is my contact info my name is Jason Miller founder of asthma now solutions and we just unlocked the power service now

View original source

https://www.youtube.com/watch?v=Iiu_MnWiFKk