开发者

Sharepoint 2010 add fields to list definition

开发者 https://www.devze.com 2023-02-10 09:21 出处:网络
I have a list definition: 开发者_如何学Python<?xml version=\"1.0\" encoding=\"utf-8\"?> name of the List Definition project item, an error will occur when the project is run. -->

I have a list definition:

开发者_如何学Python
<?xml version="1.0" encoding="utf-8"?>

name of the List Definition project item, an error will occur when the project is run. -->
  <ListTemplate
      Name="LogsList"
      Type="10004"
      BaseType="0"
      OnQuickLaunch="TRUE"
      SecurityBits="11"
      Sequence="410"
      DisplayName="Logs List"
      Description="Log instances for messages"
      Image="/_layouts/images/itgen.png"/>

</Elements>

How can I add a field? I have tried few things but fields are not appearing after the deployment.


You'll have to create Field definitions, create one or more Content Types, add the field definitions to then and add these content types to your list.


Are you using Visual Studio 2010 or VS2008 (with WSP Builder) ?? Its few minutes job if you use the above tools rather than using NotePad !

You need to define the columns in Schema.xml

you can check this video for reference - http://msdn.microsoft.com/en-us/library/gg276355.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号