内容类型不使用自定义表单

时间:2012-05-14 18:26:14

标签: sharepoint-2010

我已经使用以下xml创建了内容类型,但它没有使用我在下面的xml中指定的自定义表单。怎么了?

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Field ID="{854DCDF4-5091-4B1E-AA31-D9DC71A29637}"
      Type="Text"
      Required="TRUE"
      DisplayName="Customer ID"
      Name="Customer-ID"
      Indexed="TRUE"
      EnforceUniqueValues="FALSE" />

  <Field ID="{7E898932-91C0-4285-A8A2-B6440BE2FDC9}"
      Type="Text"
      Required="FALSE"
      DisplayName="Customer Name"
      Name="Customer-Name" />

  <Field ID="{5168AB24-21A8-438A-8112-E82E24E180CE}"
      Type="Text"
      Required="FALSE"
      DisplayName="Country"
      Name="Country" />

  <!-- Parent ContentType: Item (0x01) -->
  <ContentType ID="0x010081e20b9903d945a8beacde43ae09f766"
               Name="Customer"
               Group="Custom Content Types"
               Description="Customer Content Type"
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
      <FieldRef ID="{854DCDF4-5091-4B1E-AA31-D9DC71A29637}" />
      <FieldRef ID="{7E898932-91C0-4285-A8A2-B6440BE2FDC9}" />
      <FieldRef ID="{5168AB24-21A8-438A-8112-E82E24E180CE}" />
    </FieldRefs>
    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
          <New>_layouts/customer/customer.aspx</New>
          <Display>_layouts/customer/customerdisp.aspx</Display>
          <Edit>_layouts/customer/customeredit.aspx</Edit>
        </FormUrls>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>
</Elements>

1 个答案:

答案 0 :(得分:2)

尝试Inherts =&#34; FALSE&#34;作为元素的属性