Restrict knowledge article validity

Atchutaram
Tera Contributor

Hi Team,

               We have set the knowledge article validity to one year, when any user tries to change it more than one more, it should not allow him to do so. the one year date only should be only populated. The field should not be read only.

 

How can I do this?

 

 

1 ACCEPTED SOLUTION

Hi @Atchutaram 

 

This is my weak area :(. I am not a developer. 

 

@Jaspal Singh  @Sohail Khilji any help here.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

8 REPLIES 8

Hi @Atchutaram 

 

This is my weak area :(. I am not a developer. 

 

@Jaspal Singh  @Sohail Khilji any help here.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Thank you @Dr Atul G- LNG  for your assistance, i am also posting this as one more question with code. Thank you very much for extending the help.

@Dr Atul G- LNG thanks 👍

 

 

Hi @Atchutaram ,

 

There are 2 dates here one is article created date and another one is today's date so which of this 2 dates do you want to limit it to 1year ?

 

If it's today's date then you can simply do it with UI policy using relative filter. If it's created (or published date) you have to use Client script and check if the date selected falls within the 365days since publish or created. 

 

I hope this helps...

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Please see the script I posted on the other post you submitted - https://www.servicenow.com/community/developer-forum/restrict-knowledge-article-valid-to-field/td-p/...


If my response helped you, please click on "Accept as solution" and mark it as helpful.
- Saloni