Understanding Custom List Definitions in SharePoint.


For creating Custom List Definitions through Feature as a Provisioning Component, we need to create our Feature.xml file that would be pointing to element.xml having our List Definition.

The feature file would be something like this

<?xml version=1.0 encoding=utf-8?>

<Feature Id=00BFEA71-DE22-43B2-A848-C05509900111

    Title=My Custom List Feature

    Description=This is a custom list feature

    Version=1.0.0.0

    Scope=Web

    Hidden=TRUE

    DefaultResourceFile=core

    xmlns=http://schemas.microsoft.com/sharepoint/>

                <ElementManifests>

                                <ElementManifest Location=elements.xml />

                </ElementManifests>

</Feature>

The elements.xml would contain the following information

<?xml version=1.0 encoding=utf-8?>

<Elements xmlns=http://schemas.microsoft.com/sharepoint/>

    <ListTemplate

        Name=CustomList

        Type=10001

        BaseType=0       

        Sequence=2000

        DisplayName=My Custom List

        Description=Creating a custom list/>

</Elements>

 

Element manifest contains ListTemplate element.

Name – Name of the List. One important thing about Name attribute is that there must be a directory with the same name as value of this attribute within the feature directory which would contain schema.xml. All the information for the list would be defined in the schema.xml.

Type – List Type Identifier, for custom list types the value should be more that 10000.

BastType– Value 0 indicates that this list type is for standard list. ( 1- Document library, 3-discussion forums, 5- issue lists)

Sequence– It defines where the link would appear for the list type on the Create Page.

So we would have a folder for feature say My Custom List, this folder feature would have feature.xml,elements.xml and one more folder with name CustomList ( same as Name attribute value at elements.xml) . The CustomList folder contains schema.xml.

Schema.xml would be defining the content types, fields within the content types, views and forms for the list.

This is the basic structure of Schema.xml

<?xml version=1.0 encoding=utf-8?>

<List Title=My Custom List Url=Lists/CustomList BaseType=0>

                <MetaData>

                                <ContentTypes></ContentTypes>

                                <Fields></Fields>

                                <Views></Views>

<Forms></Forms>

                </MetaData>

</List>

In content types, we could add reference to standard as well as custom content types.

Fields- Here we need to include all fields for our referenced content type.

Views- Defining different views for the list.

Forms – We could associate our custom New, Edit or Display form. If not specified than default forms would be used.

Bye…


Discover more from Nishant Rana's Weblog

Subscribe to get the latest posts sent to your email.

Unknown's avatar

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Understanding Custom List Definitions in SharePoint.”

  1. hi, i have a question, do we need to attach a database while creating a custom list. is it necessary.

    or sharepoint use lists as table so that we can store data in it.

    Like

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Nishant Rana's Weblog

Subscribe now to keep reading and get access to the full archive.

Continue reading

Power Platform Puzzles

D365 CRM, Power Platform Tips &Tricks

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Microsoft Business Applications Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog - PPUG.ORG

AI - Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue

The Professional Paraphraser

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

Power Platform Learning

Your Go-To Resource for Power Apps, Power Automate & More

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.