Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 09:19 PM - edited 05-28-2024 09:22 PM
Hello @Ballela Siva Te ,
Here's how your UI Action form should look:
- Name: Extend Review Date
- Table: Knowledge (kb_knowledge)
- Action name: extend_review_date
- Show insert: Unchecked
- Show update: Checked
- Show on form: Checked
- Condition:
var reviewDate=current.review_date,today=new GlideDateTime,fifteenDaysFromNow=new GlideDateTime;fifteenDaysFromNow.addDaysLocalTime(15);
- Script:
var reviewDate = new GlideDateTime(current.review_date);
reviewDate.addMonthsLocalTime(6);
current.review_date = reviewDate;
current.update();
gs.addInfoMessage('The review date has been extended by six months.');
action.setRedirectURL(current);
If you find my response helpful, please consider marking it as the 'Accepted Solution' and giving it a 'Helpful' rating. Your feedback not only supports the community but also encourages me to continue providing valuable assistance.
Thanks,
Amitoj Wadhera