Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

The date of entry field must accept only current date (as per system date) and not past or future da

shirisha yadav
Tera Contributor
 
1 ACCEPTED SOLUTION

Eshwar Reddy
Kilo Sage

Hi @shirisha yadav 

Create On Before BR

var gdt = new GlideDateTime();

var todayStr = gdt.getLocalDate().toString();

 if (current.date_of_entry.toString() !== todayStr)

{

current.date_of_entry = todayStr;

 gs.addErrorMessage('The date of entry must be the current date.');

current.setAbortAction(true);

}

Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

2 REPLIES 2

Eshwar Reddy
Kilo Sage

Hi @shirisha yadav 

Create On Before BR

var gdt = new GlideDateTime();

var todayStr = gdt.getLocalDate().toString();

 if (current.date_of_entry.toString() !== todayStr)

{

current.date_of_entry = todayStr;

 gs.addErrorMessage('The date of entry must be the current date.');

current.setAbortAction(true);

}

Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution

need to change in email script