Html bobswift |
---|
<iframe width="560" height="315" src="https://www.youtube.com/embed/cK2qPE06w_k" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe> |
Bitbucket file macro |
---|
showLineNumbers | true |
---|
title | AllowIfDateRange.sil |
---|
url | https://bitbucket.cprime.io/projects/CAP/repos/sil-script-library/raw/Workflow_Validators/AllowIfDateRange.sil?at=refs%2Fheads%2Fmaster |
---|
syntaxHighlighting | JavaScriptUse this script as a workflow transition validator to allow transition only if a date field is within 180 days from today. Code Block |
---|
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;
} |