Get List Status of workflow in sharepoint

public static string GetWorkflowStatus(SPListItem listItem,  string workflowTitle)
{    
    var workflowStatusField = listItem.Fields[workflowTitle] as SPFieldWorkflowStatus;
    int statusValue = int.Parse(listItem[workflowStatusField.StaticName].ToString());
    return workflowStatusField.GetFieldValueAsHtml(statusValue);
}

 

原文地址:https://www.cnblogs.com/sgciviolence/p/6545014.html