The MSS transaction Action date needs to be restricted previous Pay period to next pay period date
Hi ,
We have a requirement to restrict managers to take action on e.g. transfer for a particular date range. It has to be from previous pay period's start date to next Pay period's end Date.
I have tried below code, but it does not work, it is going on FASLE condition.
Anybody has any solution to this?
define([], () => { 'use strict';
/** * * @param {object} context * @return {boolean} */ function runCondition(context) { const { $componentContext, $fields, $modules, $user } = context;
const dateFrom =$fields.payrollPeriodDates.PreviousPeriodStartDate.$value(); const dateTo = $fields.payrollPeriodDates.NextPeriodEndDate.$value(); const actionDate = $fields.employmentWhenAndWhy.ActionDate.$value(); if (actionDate>dateTo && actionDate<dateFrom) { return true; }