using Microsoft.SharePoint.Workflow; using System; using System.Reflection; namespace SPSolutions.SharePoint.Workflow { public static class SPWorkflowAssociationUtil { public static string GetStatusColumnName(SPWorkflowAssociation workflowAssociation) { if (!workflowAssociation.StatusColumn) { return null; } Type typeFromHandle = typeof(SPWorkflowAssociation); PropertyInfo property = typeFromHandle.GetProperty("InternalNameStatusField", BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); if (property == null) { return null; } object value = property.GetValue(workflowAssociation, null); if (value == null) { return null; } return (string)value; } } }