Set knowledge article expiry | Use-case | ServiceNow
hi everyone in today's video I'm going to focus on a small use case related to knowledge articles so when we talk about knowledge articles there is a field on the form that says a valid to date which is usually when you select let's say I want to select a knowledge base on here so let me select ID so this gets uh populated by default as this date which is quite far from here I'm not sure if this article would exist but then several people would make the knowledge managers would make an update to the article if it is something which is very relevant to the organization and to certain groups of people uh in the company so what's the best way to set a default value of let's say after one year after two years there is actually a Hidden Gem when we talk about populating this field value how come it is getting populated as first of Jan 2100 so that's the first question so to take a look at that let me go to the knowledge base list okay this actually a field on the knowledge base from the name of the field is article validity so if I want to let's say by default set my article to expire after one year based on the valid to date then this is the field that I need to set up so let's say I save article validity at 365 days for the ID knowledge base and if I try to create a knowledge article now so by default this valid to field is empty there is no knowledge base so this works on the basis of a knowledge base so I have to select one so let's say I selected customer service knowledge base so if you remember the article validity field was empty when we talked about the customer service so if it is empty service now populates a default value which is a date after decades now let me select the it knowledge base where I had set the value so you can see today is 7th of November 2022 and the date now is populated as 7th November 2023 so this is how we can set the date of our article to be expired let's say somewhere near in the future may be based on the client's requirement it can be one year or maybe it can be two years now let's say we already have some knowledge basis in the system and this is not set up yet so what we can do uh if let me go to the knowledge base pack again so whatever number of knowledge bases are visible in this particular list one way is to update the list uh manually if this is a very big list which I assume it won't happen for any of the organization to have a list of thousand knowledge bases uh that is very I haven't seen actually so far so this thing uh for the limited knowledge articles or sorry knowledge basis can be updated manually by uh double clicking here and and doing let's say I want to expire my knowledge articles after one year so I can update here Let's ignore this for now so all these knowledge bases if I create a knowledge article on any one of them it will set the valid to date after one year now what about the new knowledge basis which are going to get created I don't want to keep updating this manually so what I can do is what I can do I can create a business rule a new business rule which will help me update this article validity field so that uh I don't have to do this manually that's it now let's give it a name set article validity um let's mark it as advanced I want to do this before insert because I want to take care of the existing knowledge basis then I want to set a field over here the name of my field is article validity and I want to set this to a value of 365 and I can say please submit this now if I go back to my knowledge base list and if I try to create a new one so I just gave a name of demo KB and let's make system administrator the owner of this knowledge base if I submit it uh you can observe that the article validity is by default set and if I try to create a new article on the knowledge base that I just created it still works because I had set up that business so also that the valid to date populates by default so this is it thank you so much for watching
https://www.youtube.com/watch?v=_3Spg4i-9iI