You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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):

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!