Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CRM 2011 - system views still showing after being disabled in managed solution

I have developed a managed solution that I have since imported into another organisation. In this solution I have created new views for the account entity and deactivated the system ones, as they are not wanted. So in the initial organisation this is fine but in the one with the managed solution the system views are still appearing, alongside the new views I've created.

Is there a setting that I've missed that stops these appearing after a solution has been imported?

Thanks

like image 312
jimminybob Avatar asked Dec 12 '25 12:12

jimminybob


1 Answers

The state of the record is independent of the solution it is in. So in your situation, you are assuming that you can export a view in the "inactive" state, but unfortunately that is not possible -- you can only export the record, not its state. It will be active by default on import.

You can confirm this by looking at the solution XML file that is exported. Observe the "SavedQuery" you are interested in and notice we dont have any metadata pertaining to active/inactive:

   <savedquery>
    <IsCustomizable>1</IsCustomizable>
    <CanBeDeleted>1</CanBeDeleted>
    <isquickfindquery>0</isquickfindquery>
    <isprivate>0</isprivate>
    <isdefault>0</isdefault>
    <returnedtypecode>1</returnedtypecode>
    <savedqueryid>{guid}</savedqueryid>

As for what to do about it: if you have a small number of orgs you need to export your solution to, you are best served by manually disabling the views in each organization you import your solution into. But if you plan on importing this solution to many organizations you can write a small program to use the SDK APIs to disable the views you want disabled and run that after you import the solution. Hope that helps.

like image 93
BenPatterson1 Avatar answered Dec 16 '25 12:12

BenPatterson1