SPC015108: Declare all recommended attributes in Field

All recommended attributes ID, Type, Name, DisplayName, and Group should be declared in Field.

TypeName: DeclareAllRecommendedAttributesInFields
CheckId: SPC015108
Severity: CriticalWarning
Type: FieldDefinition
Resolution

When defining a custom field, you must specify the ID, Type, Name, DisplayName, and Group attributes for the field to appear correctly in Microsoft SharePoint Foundation. Statement completion in Microsoft Visual Studio erroneously indicates that you need only the first three of these attributes when in fact all five are required. See sample below:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   ...
   <Field
      ID="{060e50ac-e9c1-4d3c-b1f9-de0bcac300f6}"
      Name="Amount"
      DisplayName="Amount"
      Type="Currency"
      Decimals="2"
      Min="0"
      Required="FALSE"
      Group="Financial Columns" />
   ...
</Elements>

Links

comments powered by Disqus