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
You can try ZetExcel. then your work will be easy. just try and get result. thanks
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 -
Okay so you can use the MetadataConditionExpression class as shared earlier. Hope that will help.
Thanks for the reply but that's the catch in this scenario that i cant use XRM TOOL box.
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
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)
};
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
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6