如何恢复已删除的“快速查找视图”。在MS Dynamics CRM中

问题描述:

如果你删除一个实体的快速查找视图, 如何恢复它,请按照下列指示如何恢复已删除的“快速查找视图”。在MS Dynamics CRM中

解决方案:

  • 首先创建一个视图,并得到他的GUID,保存记事本,并删除 视图。
  • 创建一个解决方案,导入您从中删除“快速查找视图”并将其导出的选定实体。打开Customization.xml并将XML添加到以下路径。

XML路径:ImportExportXml/Entities/Entity/SavedQueries

<savedquery> 
     <IsCustomizable>1</IsCustomizable> 
     <CanBeDeleted>0</CanBeDeleted> 
     <isquickfindquery>1</isquickfindquery> 
     <isprivate>0</isprivate> 
     <isdefault>1</isdefault> 
     <returnedtypecode>Entitytypecode</returnedtypecode> 
     <savedqueryid>View Guid</savedqueryid> 
     <layoutxml> 
      <grid name="resultset" object=" Entitytypecode " jump="FieldName" select="1" icon="1" preview="1"> 
      <row name="result" id="Entity Primary Key "> 
       <cell name="name" width="300" /> 
       <cell name="createdon" width="125" /> 
      </row> 
      </grid> 
     </layoutxml> 
     <querytype>4</querytype> 
     <fetchxml> 
      <fetch version="1.0" mapping="logical"> 
      <entity name="Entity Name"> 
       <attribute name="Entity Primary Key" /> 
       <attribute name="name" /> 
       <attribute name="createdon" /> 
       <filter type="and"> 
       <condition attribute="statecode" operator="eq" value="0" /> 
       </filter> 
       <filter type="or" isquickfindfields="1"> 
       <condition attribute="name" operator="like" value="{0}" /> 
       </filter> 
      </entity> 
      </fetch> 
     </fetchxml> 
     <IntroducedVersion>1.0</IntroducedVersion> 
     <LocalizedNames> 
      <LocalizedName description="Quick Find Active" languagecode="1033" /> 
     </LocalizedNames> 
     </savedquery> 

保存文件。 上传解决方案并发布它。

+0

最佳实践:先备份系统并知道如何恢复它,并且只在沙箱系统上进行开发。作为辅助保护措施,请在开始使用系统之前导出并备份默认解决方案。通过这种方式,如果您开始在解决方案文件中尝试更改XML,那么您需要将原始配置作为参考,以备需要将其部分恢复或仅恢复整个配置。 – Eccountable

+0

在进行解决方案更改之前,我会进行备份。 很多感谢您的建议。 –

+0

如果更改此行 0 CanBeDeleted> 转换为 1 CanBeDeleted> 该视图不会被删除 –