In all our content items we have included a reminder date that by default will be set to 6 months. Is it possible to dynamically change this date each time an item is modified? Basically I want to set it up so if the user modifies or updates an item, that reminder date will automatically change to another 6 months from that date.
Shane
It is possible. You could write an extension that is triggered either on a workflow transition or when the item is submitted to update the reminder date.
See http://code.percussion.com/svn/PSOSampleProject/trunk/ from http://forum.percussion.com/showthread.php?10675-PSO-Sample-Project-Sample-Java-Extensions-Project as a sample on writing your own extension.
Thanks Jitendra, I’ll have to take a little closer look at those. I’ve never written an extension before so I’ll have to do some research.
If anyone else has any other suggestions, please let me know, thanks everyone.
Shane
Just thought I would close off this thread in case anyone searches for it. I do have a solution for this and it was quite simple actually. PSO pointed me in the right direction
You will need to have the PSO Toolkit installed.
In your PSO Toolkit install directory, there is a file named “Extensions.xml.”
Search for “PSODateAdjust.” In the “Extension” node, change the value of the “context” property from “global/percussion/user” to “user/”
e.g.
<Extension categorystring="" context=“global/percussion/user/” deprecated=“no” handler=“Java” name=“PSODateAdjust” restoreReqestParamsOnError=“no”>
…becomes:
<Extension categorystring="" context=“user/” deprecated=“no” handler=“Java” name=“PSODateAdjust” restoreReqestParamsOnError=“no”>
You will need to restart your Workbench if you had it running already.
- In Workbench, open your intended Content Type.
- In the “Content Type” tab, highlight the intended date field, and click the “All Properties” button at lower right.
- In the resulting “Field Properties” dialog, click the “Transforms” button at the bottom.
- In the middle of the resulting dialog, verify that “Transform type” is set to “Extension.”
- In the “Name” dialog, choose “PSODateAdjust.”
- In the resulting “Extension Parameters” dialog, leave the “sourceFieldName” value empty. This will cause the extension to revert to the present system date.
- Enter an integer value for the positive (in your case) date offset. E.g, to have the date in this field set to 180 days past the system date at time of last item update, enter “180” (without the quotes) in the “value” column in the row having name “days.”
- Save your changes, and ultimately save the Content Type.