Expand Minimize

Declare required attributes in FieldRef

Required attributes ID, Name must be declared in FieldRef.

CheckId SPC016501
TypeName DeclareRequiredAttributesInFieldRef
Severity CriticalError
Type FieldRef

Add required attributes ID and Name to FieldRef. Note: Attribute 'DisplayName' is not defined as required in the schema for FieldRef, but defined as required in the MSDN documentation. Therefore SPCAF considers this attribute as not required.
It is important to note, that inclusion in a built-in field can result in the built-in fields internal name.
See sample below:


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":"SPC016501:DeclareRequiredAttributesInFieldRef","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.