-
Notifications
You must be signed in to change notification settings - Fork 2
Built in or third party content type
takerusilt edited this page Sep 10, 2016
·
3 revisions
Model class can also be used to describe OOTB content types or content type deployed by other solutions, such that implementations in the project overall are more consistent.
Set SPContentTypeAttribute.ExternalContentType
to true
and the library
will keep that content type untouched during provisioning.
[SPContentType("0x0108", 01, "", ExternalContentType = true)]
public abstract class WorkflowTaskItem : SPModel {
[SPBuiltInField(SPBuiltInFieldName.Author)]
public abstract SPPrincipal SubmittedBy { get; set; }
[SPBuiltInField(SPBuiltInFieldName.StartDate)]
public abstract DateTime SubmittedAt { get; set; }
[SPBuiltInField(SPBuiltInFieldName.AssignedTo)]
public abstract SPPrincipal AssignedTo { get; set; }
[SPBuiltInField(SPBuiltInFieldName.Editor)]
public abstract SPPrincipal UpdatedBy { get; set; }
[SPBuiltInField(SPBuiltInFieldName.WorkflowLink)]
public abstract string WorkflowLink { get; set; }
[SPBuiltInField(SPBuiltInFieldName.WorkflowInstanceID)]
public abstract Guid WorkflowInstanceID { get; set; }
[SPBuiltInField(SPBuiltInFieldName.DueDate)]
public abstract DateTime DueDate { get; set; }
[SPTextField("Status")]
public abstract string Status { get; set; }
[SPNoteField("ExtendedProperties")]
public abstract string ExtendedProperties { get; set; }
}
-
Working with list items
-
Advanced model class usage
-
Other features