logo

NJP

ServiceNow Record Producer : Implementing ServiceNow Record Producer: A Step-by-Step Guide

Import · Jan 24, 2023 · video

foreign [Music] we'll be exploring one more topic into service now that is record producer so let's first try to understand what is record producing service now so record producing service now is the type of form that allows users to create a new record in a specific table such as incident or task without having to navigate to the table and manually creating a new record okay a record producer can be customized to include specific field okay and information and can be used to streamline the process of creating new records so for example if you have incident you just want only couple of variables to be exposed to the users okay and based on that variable you can create an incident you can also write your own logic to predefine certain attributes out okay so one thing will be coming in your mind what is the difference between service catalog and record producer then so it falls into the same category okay but service catalog is more on the I.T service side so service catalog allows users to provide certain information on on Via variables and it will request an ITV service for them okay for example if you want to request an Hardware if you want to request a software installation all these things can happen via service catalog while the record producer allows users to create a new record in the system for example if you want to create an incident if you want to create a a case or go it can go on okay so in this case we can reuse record processor so let's jump into the demo for the same so in today's demo I'll be using the reference of my previous implementation only for the parking application and what we'll be doing if you have seen that application I just want to enhance it up so we have created this application as a part of Meetup okay and in the parking there is parking and meter participants okay so what are we have to do this particular whenever a record get created into this particular table it a parking will get allocated and the parking gets allocated based on certain Fields okay for example participant is one where we have we have to set the user then the type of the user whether he is an intern or external user okay then we have uh type of vehicle whether he is having car or bike okay and whether he requires parking or Not So based on this information a parking get allocated to the user okay so let's get started in order to create a record producer okay you have to go to the filter Navigator and type record producer so here is it so there are around 34 record producer out of those present okay we'll create a new one so I clicked a new and it will open up the form so I will give it a name called now parking allocation parking allocation request parking allocation on I will give then we have to select the table in which you have to create the record okay so I will just type Meetup it's meet a participant this was a table then I will keep owner to myself only then we have what it will contain so basically first we will give the short description what exactly this record producer will do okay so this is the record Teresa to create participant record just like that and then we have description it's an HTML thing okay so you can add whatever you want to add and customize it out the way you want okay you can also add videos images and all and so on okay so I will just give get sent um what we can give please if I love the video form parking allocation hey so this is done we can also customize the routes I will just make it bold for now okay and I will just change the font to Cosmic size change the font to 18 that's it okay for now and then we have script which will see at the ladder point you also select an icon and picture for this particular record producer but will not be doing the same for now and I will save it out now as we have seen we have to select couple of attributes like user type of user type of vehicle and whether they require parking or not okay so these are the four attribute which will focus on we will not focus on other attributes so below that okay let's go above then we have accessibility also where you can Define catalog which catalog then you have generated data records okay where you can define a template also if you want to do and there are some portal settings okay whether you want to um show make mandatory attachment you want to hide attachment and so on so we can go to the variables okay and let's or before that let's add it to some catalog item so I will add it to which calculator I should add let's add it to service catalog only because it's it's providing some certain service so let's add it to service catalog also we can select the category for the same where exactly it will decide so let's select the category I will select edit and I can add it to so this is for now I will add it to services we also have couple of other configurations also like how in order to control the visibility right available for not available for if you want to do some of validation on client side then you can write catalog characters and so on but this has a pretty generic term so I will not look into that now let's go to variables okay let's create a new variable out so I clicked on new it open up the form I'll map it to the field because we want to create a record in participant right so I will select the checkbox map to a field and it gave this field option so I will give first one is participant now we will select the type of the field okay so it's a reference field so we will select reference over here then we have to define the question for it okay first order so I want to give it order as 100 I will make it mandatory and first I will give a requested by type specification it's a reference we have to give reference to which table services underscore user this user table if you scroll down we got the CC user table also and then we can add the reference qualifier for the same so I will just give one simple reference qualify which is active is true okay done I'll Simply Save It Out while saving it out because I want to do insert and stay okay just to save some time now the first thing is done okay now let's look into this second attribute so the second attribute which I want to see is type of user okay so I'll just select a type of user and it's a choice print okay so I will select lookup select box and it asks first of all we will Define the question so I or I will simply give it external slash internal okay because these are the two types whether UI external or internal and then we'll give type specification so we ask look up from table from which particular table we want to get the choices for this field okay so it's again Meetup with a participant and then it's like okay from this particular which particular field so I will select type of user and there are n number of configuration around the same but I will not jump into the same we can also set the default values but it's value with none so it will take some value by default only so I'm going to insert and stay for the same ah reference qualifier but it will not create any mess okay the next thing as again a lookup select box okay and this time it's type of vehicle so it's a vehicle type and I will give it an order as 300 I'm not sure what order I've given for the previous one 300 will Define the question we will give type and then to the type specification again Meetup table but this time it will be vehicle type okay and I will just remove the reference qualify I have to remove it from the previous one also but it will not and we have made it mandatory also so I will do insert entity so done I'll Skip One attribute okay vehicle required or not okay I will show would tell you why I've I've missed it it's intentional Miss okay so don't drop comment that you missed that out so we will open the catalog item now to see if everything is fine at this particular moment so if I go to the record producer and we can see we have three variables I will change the order for this one to make it 200 . save okay so we have 100 200 300 perfect okay now if we try it out it will look something like this okay so let's try it out so first of all I will I will just try with my favorite user able tutor is not active or what my sister so we have able tutor okay I will select this as internal and here's warning why it's coming as bike only is it bike only in that table let's let's just check quickly new tab so you can type car bike but why it's coming only bike okay let's let's see on that and if I submit it out okay and if I jump to this participant table meet the participant foreign if I bring created by now so a new record got created just now okay over here and it if I open this record out so we got type of user as internal vehicle type is bike cable Twitter now one thing is remaining which is the parking required right why I kept it the backend value for this parking required right why I kept it like this okay because I just want to show one more feature on the same so if I go back to a record producer we have something called Script okay where you can Define certain attributes okay where you can set those attributes out so let's do that you can see over here the script so we'll be setting this attribute y script why because if I use the want parking then only he will come to this character item right so by default it should be true right whenever a user is requesting it via this catalog item that's why so we will do current Dot whatever the field name parking required and equal to true I'll save it out now and one more thing I want to check was with the variable right one of the variable why it was just showing bike where it should show piket car so it was a vehicle driver so I will go to the vehicle type field vehicle type vehicle type no reference qualifier you know everything seems so candy oh yeah everything seems okay not sure where exactly is falling apart so we'll go to the catalog item again now this time we have set that attribute one attribute from the script I'll show you again this one just a small script current dot pocket you should not add current dot update or current.inset why because before kind of thing before insert kind of thing right so you should not you should follow the best practices for on before business or whenever you are writing so we'll go for try it again this time I will give some different user starting from C Maybe so Cameron I will select camera on over here I'll give internal and why it's coming twice twice I'm not sure I'll say Pike I think it's cookies and now the record got created okay you can see this record and if you see it shot Elite internal vehicle type is buy for the user and now we have this flag also checked so this is how you can use the record producer okay in order to create any record from the service catalog hope you find this useful okay if yes please like my video and follow my channel okay to get updates on my future videos till then stay safe stay happy and have a nice day thank you

View original source

https://www.youtube.com/watch?v=-MHidv6N8Qg