我有这个功能
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="c54f20d8-1ad1-49b8-aff7-2c874dd2f45a"
Title="MyCompany Content Types"
Description="Content Types required for MyCompany Provided Applications and Functionality"
Version="12.0.0.0"
Hidden="FALSE"
Scope="Site"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="siteColumns.xml"/>
</ElementManifests>
</Feature>
以下是siteColumns.xml
的内容<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{1F343F02-22D9-45b8-A2A8-CEB2619A28C4}"
Name="AllowSubstDelivery"
DisplayName="AllowSubstDelivery"
Type="Boolean"
Format="TRUE"
Group="MyCustomGroup"
/>
</Elements>
该功能安装并激活,不会产生错误,但无法找到siteColumn,为什么此网站列不可见?
我检查了日志,没有报告任何错误。
答案 0 :(得分:1)
我发现创建定义站点列和内容类型的功能的最佳方法是使用Web界面对所有内容进行原型设计,然后将生成的CAML复制并粘贴到Visual Studio项目中。我录制了一段简短的视频,展示了您可能觉得有价值的过程。
答案 1 :(得分:0)
Format =“TRUE”是什么意思?
根据文档看起来不像。
Field Element Documentation并未告诉您有关这些属性的更多信息,但与FieldRef element有许多共同点,并且它包含有关格式属性的文档。
也许你想使用DefaultValue属性?