Expand Minimize

Define ContentTypes ID as hexadecimal GUID

It is recommended to use the GUID approach to identify any content types that are direct children of content types you did not create. Use the GUID approach if the parent content type is one of the following. That way, you are assured that the content type ID is unique and will not be duplicated later by the developer of the parent content type.

CheckId SPC015206
TypeName DefineContentTypeIDAsHexadecimalGUID
Severity Warning
Type ContentType

The ContentType should define the ID as a hexadecimal GUID. See sample below:

<ContentType  
  ID="0x0101000728167CD9C94899925BA69C4AF6743E"
  Name="Financial Document"
  Group="Financial Content Types"
  Description="Base financial content type"
  Version="0">
  <FieldRefs>
  ...
  </FieldRefs>
</ContentType>

To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.

<!-- "SuppressMessage":{"rule":"SPC015206:DefineContentTypeIDAsHexadecimalGUID","justification":"Provide reason for suppression here"} -->
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.