Domanda

I've a solution for SharePoint 2013 where I created several list and added them to a feature. When I deploy the solution to my dev environment every list has the same schema (the same columns).

They are all custom lists, made by me.

What am I missing?

More details

For example, I created a list called "List1" with the columns Title and Image. Deployed it to SharePoint 2013 and it worked fine.

Then I created a list called "List2" with the columns Title, Description and Status. Deployed everything again and saw that "List2" have the same columns as "List1" (Title and Image). Looks like SharePoint is using the same schema.xml for both lists.

Also, the lists are deployed in a feature called "Lists".

È stato utile?

Soluzione

Fixed the problem changing the template property in the list instance element.xml and in the list element.xml, as shown in the pictures below:

The files

print-1

In the list instance Element.xml I changed the TemplateType from 100 (general list type) to 1000 (a number that doesn't represent any default SharePoint template type).

print-2

In the list Element.xml I also changed the Type from 100 to 1000.

enter image description here

For every new list I incremented that number, like 1001, 1002, 1003 and so on. Now SharePoint doesn't mix the lists schemas.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top