Skip to Content

Change End date of a temp employee max 1 year

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Sep 23, 2013 at 11:44 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 23, 2013 at 12:36 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 23, 2013 at 01:32 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 25, 2013 at 08:34 AM

    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

    Add comment
    10|10000 characters needed characters exceeded