web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to export schema name of all the fields in the entity into excel file of the Entity using c#

(0) ShareShare
ReportReport
Posted on by

Hello Guys,

I am developing a console application by which i want to export the list of fields schema name into a excel file.

The Entity Name is the parameter i am using and the connection to the CRM is being established by WEB API.

There is a condition i want to put that only DateTime type fields should be there in the excel.

And i am also trying the EntityMetaData class but its not getting done.

Any help from you guys would be greatful.

Shashikant Saxena

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi Shashikant,

    I would really recommend, you use XRM tool box plugin "Metadata document generator" using which you can generate the schema excel file from any entity on a single cllick.

    Later you can apply filter on your excel?

    Regards,

    Rawish

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Otherwise , have  a look here :

    docs.microsoft.com/.../jj733870(v%3Dcrm.8)

    MetadataConditionExpression[] optionsetAttributeTypes = new MetadataConditionExpression[] {

    new MetadataConditionExpression("AttributeType", MetadataConditionOperator.Equals, AttributeTypeCode.Picklist),

    new MetadataConditionExpression("AttributeType", MetadataConditionOperator.Equals, AttributeTypeCode.State),

    new MetadataConditionExpression("AttributeType", MetadataConditionOperator.Equals, AttributeTypeCode.Status),

    new MetadataConditionExpression("AttributeType", MetadataConditionOperator.Equals, AttributeTypeCode.Boolean)

    };

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Sashikant,

    As Rawish already suggested, XRMToolbox metadata generator plugin is the best way to export entity schema in Dynamics CRM.

    See here the steps-

    bhoopathigoudk.blogspot.com/.../extract-ms-dynamics-crm-fields-to-excel_4.html

  • Community Member Profile Picture
    on at

    Thanks for the reply but that's the catch in this scenario that i cant use XRM TOOL box.

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Okay so you can use the MetadataConditionExpression class as shared earlier. Hope that will help.

    docs.microsoft.com/.../jj733870(v%3Dcrm.8)

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Sashikant,

    Sorry I missed your subject line C# . Here is the reference will be useful for you -

    For Entity -

    docs.microsoft.com/.../sample-dump-entity-metadata-file

    For Attributes -

    docs.microsoft.com/.../sample-dump-attribute-metadata-file

  • Suggested answer
    Frank Miller Profile Picture
    10 on at

    You can try ZetExcel. then your work will be easy. just try and get result. thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans