By default, the Editable Grid is installed on the Account, Contact, Lead, Opportunity, and Case entities. However, it can also be installed on any custom entity.

Installing on a Custom Entity

The list of entities the Editable Grid is installed on can be changed by overriding the Ribbon Command used by the Editable Grid in the Application Ribbon. Because the Editable Grid Solution is managed, the Ribbon Command must be overridden from a different, unmanaged Solution. To create a new Solution, navigate to Settings > Solutions > New.

CreateSolution

On the New Solution form, fill out all of the required fields.

EG_Configuration_2

Save the solution, and after the form has refreshed, navigate to Components > Add Existing > Application Ribbons.

EG_Configuration_3

After the Application Ribbon is added to the Solution, click the Export Solution button at the top of the form in the Solution Ribbon. When the Export Solution Dialog appears, click the Next button twice, and then the Export button. When prompted, save the solution to a folder on your computer. After the solution is saved to your computer, close the current browser window. In Window Explorer, navigate to the solution zip file that was just downloaded, and unzip it. It will contain three files: [Content_Types].xml, solution.xml, and customizations.xml. Open the customizations.xml file in your favorite text editor, and merge the sections highlighted in red with the existing contents of the file:

<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entities></Entities>
  <Roles></Roles>
  <Workflows></Workflows>
  <FieldSecurityProfiles></FieldSecurityProfiles>
  <Templates />
  <RibbonDiffXml>
    <CustomActions />
    <Templates>
      <RibbonTemplates Id="Mscrm.Templates">
    </RibbonTemplates>
  </Templates>
    <CommandDefinitions>
      <CommandDefinition Id="EditableGrid.OpenGridCommand">
        <EnableRules />
        <DisplayRules>
          <DisplayRule Id="EditableGrid.SetDisplay" />
        </DisplayRules>
        <Actions>
          <JavaScriptFunction FunctionName="EditableGrid.openGrid" Library="$webresource:sonoma_/EditableGrid/Ribbon/grid.js">
            <CrmParameter Value="SelectedControl" />
          </JavaScriptFunction>
        </Actions>
      </CommandDefinition>
    </CommandDefinitions>
    <RuleDefinitions>
      <TabDisplayRules />
      <DisplayRules>        
        <DisplayRule Id="EditableGrid.SetDisplay">
          <OrRule>
            <Or>
              <EntityRule EntityName="account" />
            </Or>
            <Or>
              <EntityRule EntityName="contact" />
            </Or>
            <Or>
              <EntityRule EntityName="opportunity" />
            </Or>
            <Or>
              <EntityRule EntityName="lead" />
            </Or>
            <Or>
              <EntityRule EntityName="incident" />
            </Or>
            <Or>
              <EntityRule EntityName="new_customentity" />
            </Or>
          </OrRule>
        </DisplayRule>        
      </DisplayRules>
      <EnableRules />
    </RuleDefinitions>
    <LocLabels />
  </RibbonDiffXml>
  <EntityMaps />
  <EntityRelationships />
  <OrganizationSettings />
  <optionsets />
  <Languages>
    <Language>1033</Language>
  </Languages>
</ImportExportXml>
    

Replace the entity name “new_customentity” with the name of the custom entity that the Editable Grid should be installed on. To install it on more than one custom entity, create a new Or rule that contains an EntityRule for each custom entity. Save the customizations.xml file, and then create a new zip file from the three files that were originally unzipped ([Content_types.xml, solution.xml, customizations.xml).

In CRM, navigate back to Settings > Solutions, and click the Import button.

ImportSolution

On the Import Solution screen, click the Browse button and navigate to the zip file that was created earlier, making sure to select the zip file that contains the updated customizations.xml file. Click the Next button, and on the next screen click Next again. The solution should begin to import. After it’s finished, click the Publish All Customizations button at the bottom.

Once the Publish has finished, click the Close button and navigate back to the main Dynamics window. Refresh the window and verify that the Editable Grid has been installed on the custom entity.

Configuring Editability of Columns

Fields that are read-only on forms are not automatically read-only in the editable grids as CRM 2013 allows multiple forms. However, you can even configure additional columns to be read-only by using the Editable Grid Settings entity. You’ll need to create one record in this entity per entity that you want to include additional read only fields. Simply enter the schema name of the entity, and a comma delimited list of field schema names that you want to make read-only.

ColumnSettings

 

In order for read-only settings to be applied, you must also give users Read access to the Editable Grid Settings entity via Security Roles.

EG_Configuration_6