Restrict backdated transactions based on legal employer
Summary: Restrict backdated transactions based on legal employer
Content (please ensure you mask any confidential information): hi all, we are using the below groovy script to restrict backdated transfers. However, we want to restrict it for only few legal entities not all. Could someone help with code with legal employer condition as well.
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
- @param {object} context
- @return {boolean}
*/
function runCondition(context) {
const { $componentContext, $fields, $modules, $user } = context;
let date = new Date(new Date().toISOString().substring(0, 10));
if (new Date($fields.employmentWhenAndWhy.ActionDate.$value()).getTime() < date.getTime()) {
return true;
}
return false;
}
return { runCondition };
});
Version (include the version you are using, if applicable):
Tagged:
0