cancel
Showing results for 
Search instead for 
Did you mean: 

Change End date of a temp employee max 1 year

former_member190695
Participant
0 Kudos

Hi All,

I am looking for a solution to limit managers from selecting a date longer than a year from current date when extending a contract.

The only thing I can think of is perhaps Regular Expressions as I am not a fan of Extension Framework.

Any idea's how we could achieve this requirement?

Thanks very much.

Regards,

Ridouan

Accepted Solutions (1)

Accepted Solutions (1)

terovirta
Active Contributor
0 Kudos

What I've done as a workaround is to replace the MX_VALIDTO (or make it readonly) from the UI with custom attribute/drop down that has selectable number of months and then calculate the new validity end date in workflow. If the new date exceeds the maximum then setting the new end date as the maximum etc. Probably not what you're looking for as it's not very pretty and is a workaround.

Would be great if the maximum value for the date picker would be configurable or when the standard MX_VALIDTO and MX_VALIDFROM are exposed in the same UI, product would do basic checks on submit like ValidTo is later than ValidFrom etc.

Answers (3)

Answers (3)

former_member190695
Participant
0 Kudos

Hi Guys,

Thanks very much for your inputs.

I have decided to implement a Java Class using the Extension Framework to validate the Valid To date as Managers should have the option to de-provision an external employee any time.

Although I think it's a poor framework, as of now it's the only way to achieve this requirement.

Regards,

Ridouan

former_member2987
Active Contributor
0 Kudos

Ridouan,

I think I would take a slight alteration of Tero's method, in that I would create a task to extend a set number of days, probably also via a pull down for 30, 60, 90, 180 or 365 days.  The Javascript to validate that would be much easier than the extension framework, IMHO.

Matt

Former Member
0 Kudos

You can do this in the UI - but! There's always a but.  You need to write a java class to do the job.  There is some doco about extending the UI on the documentation page - the example is for checking the phone number but it should be pretty easy to adapt it for a date check.

In that instance, you can have the UI display an error message telling them the date has to be within 1 year before the form is submitted.

Peter