Manually coding effective-dating

Here is a template that I usually work from to programmatically implement effective-dating for a field. Usually PeopleTools automatically takes care of effective-dating, however there are certain situations in which this does not occur. Eg. when clicking on a hyperlink or button that then modifies a non-derived record-field on the page.

This particular scenario can be written more succinctly as shown below:

It all depends on your requirements. I usually start from the template and then re-structure as I see fit.

In summary, this logic ensures that a user will only be able to edit a field on an effective-dated page when any of the following criteria is met:
– The row has been newly inserted
– The row is future dated
– The context is Correction mode.

Leave a Reply

Your email address will not be published. Required fields are marked *