Skip to content

Custom fields example inside elements.xml vs schema.xml #8508

@m0jimo

Description

@m0jimo

I wanted to create a new List with custom fields/columns and Edit form configuration when the application is added to the App catalogue. I followed the guide on this page and also saw the video which shows that the fields should be part of the elements.xml file:
image
but if the configuration shown above is used, it only creates a new list without any required fields.

After moving fields configuration to schema.xml my list with required configuration was created:
image

All examples I've found are using this page as a reference, but it hasn't been working for me. I'm using SPFx 1.15.2.

Could you, please, add more information about fields section in schema.xml, compare to elements.xml and list of individual field?

Thank you.
M0jimo

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsCategory: SharePoint developer/development documentation relatedarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/dev

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions