- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 07:36 AM - edited 03-24-2025 07:37 AM
@niveditakumari You only need to change below line of code
function onSubmit() {
//Type appropriate comment here, and begin script below
var validateSelectedDate = new GlideAjax('global.ValidationUtils');
validateSelectedDate.addParam('sysparm_name', 'validateDate');
validateSelectedDate.addParam('sysparm_expectedDate', g_form.getValue('expected_date')); //Replace your date time variable
validateSelectedDate.getXMLAnswer(function getExpectedDate(answer) {
var validatedOutput = JSON.parse(answer);
if (validatedOutput.correctDateSelected == 'No') {
g_form.addErrorMessage('kindly select date after ' + validatedOutput.requiredDate.toString());
return false;
}
});
}
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 08:11 AM
Hi @SANDEEP28,
I have made that changes.
I'm getting still same error.
Can you please help me to correct that.
Regards,
NIvedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 09:24 AM
Hello @niveditakumari
Did you try my script ?
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 10:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 10:20 PM
@niveditakumari Share screenshot of error and scripts