Restrict backdated hiring based on role and legal entity — Cloud Customer Connect
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 hiring based on role and legal entity

Summary: Restrict backdated hiring based on role and legal entity


Content (please ensure you mask any confidential information):

Hi all, I have used the below JS to restrict backdated hiring. Hire an employee and add pending worker. I would like to know how can we include the Role and Legal Entity condition in the same.

/* eslint-disable dot-notation */
define([], () => {
'use strict';

/**
*

  • @param {object} context
  • @
    */
    function runCondition(context) {
    const { $componentContext, $fields, $modules, $user } = context;
const date = new Date(new Date().toISOString().substring(0, 10));

if (new Date($fields.actionOccurrences.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!