Skip to end of banner
Go to start of banner

Use validators based on date range

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Use the following script as a workflow transition validator, to allow a transition only if the date field value is within 180 days from today.

interval range = "180d";
date maxDate = currentDate() + range;

string errorMsg = "Due date must be within 180 days of today";

if(isNull(due) || due > maxDate) {
    return false, "error", errorMsg;
}
  • No labels