Hi guys,
Do you know if there is any way to export all standard system views from CRM at once?
Regards,
Ana
*This post is locked for comments
Hi guys,
Do you know if there is any way to export all standard system views from CRM at once?
Regards,
Ana
*This post is locked for comments
Thanks a lot!
Have a nice day!
Ana
Ah!
You can query savedquery entity but it will just fetchxml - not a excel view.
I dont think we have any tool in xrmtoolbox also which allow to export views in excel that too in bulk.
Only option will be to export data in excel for each view - that will give you attribute but yea it is manual effort.
Thanks,
Prateek
You can do this with custom code.
There are two views that are stored in CRM. There is the User View and System Views
You can query the views are retrieve the fetchXml query for these views.
There is a sample solution in the SDK of how to do this on SampleCode\CS\Customizations\Views\WorkWithViews\WorkWithViews.cs, or you can take a look at the following sample:
msdn.microsoft.com/.../gg594431.aspx
When you query the results, make sure your set the querytype attribute to either 0 or 1 (based on view type you should be using 1).
If you want to run this for a particular entity, set the returnedtypecode to be the entitytypecode of the entity you are trying to retrieve:
Example:
QueryExpression mySavedQuery = new QueryExpression
{
ColumnSet = new ColumnSet("savedqueryid", "name", "querytype", "isdefault", "returnedtypecode", "isquickfindquery"),
EntityName = SavedQuery.EntityLogicalName,
Criteria = new FilterExpression
{
Conditions =
{
new ConditionExpression
{
AttributeName = "querytype",
Operator = ConditionOperator.Equal,
Values = {1}
},
new ConditionExpression
{
AttributeName = "returnedtypecode",
Operator = ConditionOperator.Equal,
Values = {Opportunity.EntityTypeCode}
}
}
}
};
RetrieveMultipleRequest request = new RetrieveMultipleRequest { Query = myQuery };
RetrieveMultipleResponse response = (RetrieveMultipleResponse)service.Execute(request);
Thanks for the answer, but it's not what I need, let me explain in more detail - my Customer wants to get system views in Excel to verify which views he want to change (add columns, remove standard columns etc.) and maybe there is a way to prepare those views with help of some app, not manually:)
The recommended way is to create a solution and add only the views you need and then you can export this solution.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156