The Now Platform® Washington DC release is live. Watch now!
‎02-08-2017 04:57 AM
1) | This is related to KB articles. There will be a valid date field on KB form. Ideally after that date , article gets retired. So , create an UI Action named Publish which will be visible only in Retired articles and if we click on it, validate that user changes valid to date to a future date. If date is in past or today, do not publish it. | |
2) | Create two fields on KB form. Group Reference to Groups table User Glide list field reference to User table. Fill Group field with some group. Now create a UI Action "All Users" , if we click on it, the users of the grp belonging to Group should be filled in User glide list field | |
How to perform this |
Solved! Go to Solution.
‎02-08-2017 10:36 PM
I dono what is wrong in your code,
I have tested this and it does work
//code
if(current.valid_to <= gs.nowDateTime()){
gs.addInfoMessage('Invalid date.Please enter future date');
current.setAbortAction(true);
}
else
{
current.workflow_state = 'published';
current.update();
}
action.setRedirectURL(current);
‎02-08-2017 05:20 AM
1. For 1st you would need to write an AJAX call to ClientdatetimeUtils script include (I guess it is present in OOB configuration). Pass input date and valid to date through the UI action and then return an error if valid to date is before input date.
2. Again a client side UI action with an AJAX Call to custom script include. This script include would take Group name as parameter and give all users of that group as output.
‎02-08-2017 10:08 PM
1) | This is related to KB articles. There will be a valid date field on KB form. Ideally after that date , article gets retired. So , create an UI Action named Publish which will be visible only in Retired articles and if we click on it, validate that user changes valid to date to a future date. If date is in past or today, do not publish it. |
For this one Im validating date Will share the screenshot Issue is whatever date I give it is displaying an error msg.
‎02-08-2017 10:36 PM
I dono what is wrong in your code,
I have tested this and it does work
//code
if(current.valid_to <= gs.nowDateTime()){
gs.addInfoMessage('Invalid date.Please enter future date');
current.setAbortAction(true);
}
else
{
current.workflow_state = 'published';
current.update();
}
action.setRedirectURL(current);
‎02-08-2017 10:59 PM
At first I have done like this only Harish. For that too I am not getting