onChange script error: ReferenceError: 'validateStartDateBeforeEndDate' er ikke defineret function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2019 02:30 AM
When using ui policies to set start date and end date automatically i get this error when create new change. The error appears in New York but worked fine in London release
Listed below is error in screendump, the policy and further down the error in text
******* UI Policy ******
function onCondition() {
function AddZero(num) {
return (num >= 0 && num < 10) ? "0" + num : num + "";
}
var n = new Date();
g_form.setValue('end_date',AddZero(n.getDate()) + "-" + AddZero(n.getMonth() + 1) + "-" + AddZero(n.getFullYear()) + " " + AddZero(n.getHours()+12) + ":" + AddZero(n.getMinutes()+5) + ":" + AddZero(n.getSeconds()));
g_form.setValue('start_date',AddZero(n.getDate()) + "-" + AddZero(n.getMonth() + 1) + "-" + AddZero(n.getFullYear()) + " " + AddZero(n.getHours()+6) + ":" + AddZero(n.getMinutes()+5) + ":" + AddZero(n.getSeconds()) );
}
*** ERROR ****
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 10:54 PM
thanks mate, great explanation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 01:31 AM
Do the field population via Client Script, not UI Policy.