/// <summary>
/// An item was added.
/// </summary>
public override void ItemAdded(SPItemEventProperties properties)
{
base.ItemAdded(properties);
if(!IsMyCustomListItem(properties.ListItem))
{
return;
}
var progId = properties.ListItem.ProgId;
// If a content type of word doc
// was added for example, this property would be of string value Word.Document
properties.ListItem.ProgId = "MyIdentifier.Identifier";
properties.ListItem.Update();
}
This is my current solution for setting the ProgId attribute for my custom listitems that are of custom content type. DocumentSet, Word documents and many other files inherit this attribute from somewhere - where exactly ?
From what i understood, this is a meta tag for html documents - i have no idea what to add to my feature.
Edit: Tried this in content type CAML, ProgId still not getting set for added listItems:
<ContentType ID="0x0120008d88d270aed24e86b061dd7977c54f31"
ProgId="MyIdentifier.Identifier"
/>