- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 03:08 AM
Hi All,
I have a requirement where i have a checkbox field in Knowledge article - Exemptions
Also i have a Exemption End date field. Whenever the Exemption end date is crossed, the condition should uncheck the Exemptions checkbox in the article.
If any solution already available, please do share. Thanks
Thanks,
Yaseen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 05:51 AM
HI @MohammedYaseen
You can create a schedule job that run daily and will check the records if for any record Exemption end date is crossed it will uncheck field.
refer: var gdt = new GlideDateTime();
var date = gdt.getLocalDate(); //Get today's date
var exedate =current.<date field name> ; //Get Exemption end date
if (exedate < date ) {
current.<checkbox field name>= false; //Uncheck Exemptions checkbox
}
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thank You!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 03:34 AM
Hi @MohammedYaseen,
can share a your script with us? so that will support on it. OR try following script in BR.
var currentDate = new GlideDateTime();
if (current.exemption_end_date && current.exemption_end_date < currentDate) {
current.exemptions = false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 03:51 AM
Thanks @Community Alums . I will try this and let you know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 05:51 AM
HI @MohammedYaseen
You can create a schedule job that run daily and will check the records if for any record Exemption end date is crossed it will uncheck field.
refer: var gdt = new GlideDateTime();
var date = gdt.getLocalDate(); //Get today's date
var exedate =current.<date field name> ; //Get Exemption end date
if (exedate < date ) {
current.<checkbox field name>= false; //Uncheck Exemptions checkbox
}
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 12:54 AM
Thanks @Ayushi12