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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans