SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Development and Programming
>
Auto generated e-mail when article set to expire possible?
Auto generated e-mail when article set to expire possible?
- Ok so I have read many articles and scoured the internet I dunno if this is even possible.
The closest I have got is to setup a custom policy. YET, when I goto my policy to set one for the article list the only option I have is on date to delete.
In my mind there should be a way to create a drop down to e-mail and the value would be that of the original article poster.
Does this even make sense or does someone have a good read that I can follow up on?
Answers
- Create a workflow (http://office.microsoft.com/en-us/sharepointdesigner/HA101005911033.aspx)
More help on workflow:
http://office.microsoft.com/en-us/sharepointdesigner/CH100667661033.aspx
Please note:
SPD is limited in its functionality, if it cannot suffice your requirement, you will need VS to help you.
In VS you can create a timer job to check whether an aritcle is going to expire.
Creating Custom Timer Jobs in Windows SharePoint Services 3.0 (http://msdn.microsoft.com/en-us/library/cc406686.aspx)
Creating Custom SharePoint Timer Jobs (http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx)
Keep It Simple and Stupid.- Marked As Answer bydesign4fun Wednesday, November 18, 2009 4:59 PM
- Finished it!
Using a calculated column and a workflow that is paused until a date!- Marked As Answer bydesign4fun Wednesday, November 18, 2009 4:59 PM
All Replies
- you can have Disposition Workflow in combination with the expiration policy that would make tasks for each item that expires but wouldnt delete them unless the people who has access to this task list go in and confirm the deletion. you can set up alerts on this tasks list. more explanation here:
http://office.microsoft.com/en-us/sharepointserver/HA101544291033.aspx
if you would like to have a dropdown of the article author etc, i think you will have to create custom workflow - I do not believe I can do these things without access to the server?? Please correct me if I am wrong...
In this article:
http://vspug.com/tonstegeman/2007/02/20/adding-a-custom-action-to-the-moss-expiration-policy/
It explains that I must implement the IExpirationAction ; found in the namespace Microsoft.Office.RecordsManagement.Features
public class ExpirationSendWarning : IExpirationAction { public void OnExpiration(Microsoft.SharePoint.SPListItem item, System.Xml.XmlNode parametersData, DateTime expiredDate) { // Do whatever you need to do with you item when it expires } }Then it states I need to "put this in a strong named assembly and add it to the GAC."
As well as creating the custom xml file then to register the action....
My question is how can I do this? What will I need what programs do I need to install?
- How do I create this policy? Do I need to update my default.aspx file? and then create the xml?
- you need to create this as a feature that will have :
1. class that would have your custom expiration action logic and it inhertits from IExpirationAction
2. you can create an xml OR you can just use the string type as the xml needs to be a added as a string to the PolicyResourceCollection.Add(xmlstring) which you will do when on FeatureActivated event
3. set up the policy on the document
check this out for IExpirationFormula on msdn that will give you a little more detailed steps on similar but not the same task:
http://msdn.microsoft.com/en-us/library/cc453774.aspx - Might I add that I only have SharePoint Designer ;/
Dunno if this is going to make the problem harder or is this even possible? - Yes, it is possible. But you need tools to do it.
If you only have SPD, I suggest you go with the workflow option.
Even you have developed a custom expiration policy, you will still need to access the server to deploy the feature. You cannot do it with only the client.
SharePoint Server 2007 SDK(http://msdn.microsoft.com/en-us/library/ms550992.aspx) has a detailed description of the policy schema and the different elements that can be used there.
Download details: SharePoint Server 2007 SDK: Software Development Kit
Keep It Simple and Stupid. - Ok I got the SDK now ;) thanks!
I am so close to completing this...
I am trying to complete my workflow..
Condition??
If CurrentDate is equal to ExpireDate (-5)
Action??
Send this E-mail - Your workflow logic seems correct based on your description of requirement.
Keep It Simple and Stupid. - How do I go about setting the data for the condition... I will give it a go again ;/
I cannot find a way to pull current date as a first variable and how to do a data field with a numerical value subtracting from it? - Create a workflow (http://office.microsoft.com/en-us/sharepointdesigner/HA101005911033.aspx)
More help on workflow:
http://office.microsoft.com/en-us/sharepointdesigner/CH100667661033.aspx
Please note:
SPD is limited in its functionality, if it cannot suffice your requirement, you will need VS to help you.
In VS you can create a timer job to check whether an aritcle is going to expire.
Creating Custom Timer Jobs in Windows SharePoint Services 3.0 (http://msdn.microsoft.com/en-us/library/cc406686.aspx)
Creating Custom SharePoint Timer Jobs (http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx)
Keep It Simple and Stupid.- Marked As Answer bydesign4fun Wednesday, November 18, 2009 4:59 PM
- Finished it!
Using a calculated column and a workflow that is paused until a date!- Marked As Answer bydesign4fun Wednesday, November 18, 2009 4:59 PM


