How To: Get workflow description which is more than 255 characters

Question1: Is it possible to get the information from the description field of workflow history list only for the running instance of the workflow? also if the description value is more than 255 characters, it truncates the value so how to get the complete value?

Question2: SharePoint history is supposed to be purged every 60 days, is it possible to modify this default behavior?

 

Resolution

Following are the five fields of “workflow history” list for which we can create a condition to filter out the history list items specific to the running instance of the workflow. The workflow object in our code will be able to provide values to compare with these fields.

·    Workflow History Parent Instance
·    Workflow Association ID
·    Workflow Template ID
·    List ID
·    Primary Item ID

60 days limit of “Workflow History”

Approach 1.
Embed following XML snippet in MetaData tag of workflow.xml.
<MetaData ...>
                        <AutoCleanUpDays>365</AutoCleanupDays>
</MetaData>

Approach 2.
SharePoint object model
<https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowtemplate.autocleanupdays.aspx>

 

Keywords: workflow history list, how to access description field of workflow history list, sharepoint, moss 2007