1

I have encountered the following problem...
I was trying to create an SPField of 'TaxonomyFieldType' type. So that I created it's xml definition (including the hidden note field) in a farm solution, but any attempt to deploy the project ends up with a feature activation error (where I'm mapping this field with the corresponding term set) saying that field with such GUID (I mean my taxonomy field GUID) is not found on the site.

Field XML definition:

<Field ID="{C6721D87-1561-443C-A0C6-9A9447F363B2}"
  Name="SoftwareStatus"
  DisplayName="$Resources:ENRCSoftware, SoftwareStatus;"
  Required="FALSE"
  Type="TaxonomyFieldType"
  ShowField="Term1033"
  EnforceUniqueValues="FALSE"
  Group="$Resources:ENRCEntity, FieldsGroup;"
  StaticName="SoftwareStatus"
  AllowDeletion="FALSE"
  DisplaceOnUpgrade="TRUE"
  Indexed="FALSE"
  Sealed="FALSE">
<Customization>
  <ArrayOfProperty>
    <Property>
      <Name>TextField</Name>
      <Value xmlns:q6="http://www.w3.org/2001/XMLSchema"
      p4:type="q6:string"
      xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{47524C37-C325-4846-B7AF-FE66BDC693BC}</Value>
    </Property>
  </ArrayOfProperty>
</Customization>
</Field>

<Field ID="{47524C37-C325-4846-B7AF-FE66BDC693BC}"
    Name="SoftwareStatusTaxHTField0"
    DisplayName="$Resources:ENRCSoftware, SoftwareStatus_0;"
    Hidden="TRUE"
    Type="Note"
    Group="$Resources:ENRCEntity, FieldsGroup;"
    ShowInViewForms="FALSE"
    StaticName="SoftwareStatusTaxHTField0"
    CanToggleHidden="TRUE"/>

In a FeatureActivated event of a feature web.Fields.Contains(new Guid("{C6721D87-1561-443C-A0C6-9A9447F363B2}")) returns false.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.