locked
Periodic Review - modified date or custom date? RRS feed

  • Question

  • I am workingon a periodic document review process, and am trying to decide what to use for the date of last review of the document. (also what field to use for who should perform the review).

    For those of you who have implemented periodic document review workflows, do you use the modified date, or did you create a custom date (as in a new content type with a custom site column such as "last review date") (Our administrtive admin has been modifying meta data and making format changes (header & footer) to the documents, without actually modifying the documents. This led management to ask "can we have a seperate review date?" since they don't want her changes to reset the dates.)

    I am concerned about the behavior of sharepoint using either column:

    1. when copying files from one doclib to another (if both doclibs have my custom content type as the default) using "open in windows explorer" (users just drag and drop files) amazingly it keeps my custom metadata. But modified date is reset. score one for custom date.

    2.  when users modify a doc, the last review date will not be updated (doing so in an event would defeat the purpose of having a seperate date). users might modify a doc then the next day get an email saying it hasn't been reviewed in 6 months. modified date is better here.

    And when you decide who "owns" a document to get the notification they need to update what field do you use ? I am using _Author (we are setting that for all docs in our dept at least) and if that doesn't work then Modified By. I am concerned Created By might get me old data. (plus I am the created by for almost all the docs from when we migrated in a rather poor manner).

    So I thought if otherpeople have done this you might have advice on what worked for you and what didn't.

    I am going to use an information management policy to kick off a custom workflow. I like that more than a timer workflow that waits.

    Friday, July 29, 2011 2:46 PM

Answers

  • you can use custom date field for review process. so if user has set the date it will never change till user manually changes or your custom code. If you want some custom logic for custom date then you can use custom expiration formula also for your periodic review like code below

    class CustomExporation : IExpirationFormula

        {

            public Nullable<DateTime> ComputeExpireDate(SPListItem item, System.Xml.XmlNode parametersData)

            {

                try

                {

                    Nullable<DateTime> dtReturn = null;

     

                    if (String.Compare(item.Title, "Me", true) == 0)

                    {

                            TimeSpan diffTime = Convert.ToDateTime(item["MyDateColumn").Subtract(DateTime.Now);

                            if (diffTime.Days <= 0)

                            {

                                dtReturn = DateTime.Now;

                            }

     

                    }

                    return dtReturn;

                }

                catch

                {

                    return null;

                }

     

            }

     

        }

     

     

    and install in sharepoint by below code

     

     

     //Add Custom Expiration Formula for expiration

                    string xmlManifest = "<PolicyResource xmlns=\"urn:schemas-microsoft-com:office:server:policy\"" +

                    " id = \"MyFormula" +

                    " featureId=\"Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration\"" +

                    " type = \"DateCalculator\">   <Name>MyFormula</Name>" +

                    "<Description>MyFormula</Description>" +

                    "<AssemblyName>Custom, Version=1.0.0.0, Culture=neutral," +

                    "PublicKeyToken=8206aadfe6904900</AssemblyName>" +

                    "<ClassName>Custom.Custom</ClassName>" +

                    "</PolicyResource>";

     

                    try

                    {

                        PolicyResourceCollection.Delete("MyFormula");

                    }

                    catch (Exception ex)

                    {

                    }

                    PolicyResourceCollection.Add(xmlManifest);


    Rahul Sharma -------------------------- Coding is all about passion !!!!!!
    • Marked as answer by Emir Liu Friday, August 5, 2011 6:28 AM
    Friday, July 29, 2011 2:59 PM