Editable Grids in Dynamics 365 and how to enable new feature.

Editable grids used to be a big issue in previous versions of Microsoft Dynamics CRM. In the past we used to use third part Add Ons to cater customer needs. There are many different third part Add Ons available in the market however I have used following two;

Finally Microsoft added Editable Grids, one of the most highly requested features in Microsoft Dynamics 365, provide rich inline editing in main grids and sub-grids so you can update the information you need with fewer clicks.

The Editable Grids control is available for both Dynamics CRM Online and Dynamics CRM On-Premises and support most of the functionality provided by standard grids, which includes

  • In-grid editing of records at the entity or sub-grid level
  • Standard navigation using a keyboard or mouse
  • Grouping and Sorting (by any column on current view)
  • Web Phone and Tablet clients
  • Filtering and Pagination
  • Moving and resizing columns
  • Lookup configuration
  • Calculated Fields and Roll-up Fields
  • Business Rules
  • Hierarchical view
  • Work with CRM security model i.e. enabling or disabling of cells based on security roles
  • Editable Grid respect read-only grid metadata and configurations
  • Editable Grid supports all data types.
  • Support JavaScript events for home grid and sub-grids (OnRecordSelect,OnSave,OnChange)
  • Support most of entity level Business Rules (Show error message,Set field value,Set business required,Set default value,Lock or unlock field)

How to Enable Editable Grids in Dynamics 365

Navigate to Settings > Customizations > Customize the System

editablegrid_customisation_navigation

Click on the entity for which you want to enable editable grid. Then click the Controls tab, and then click Add Controls to display the Add Control dialog.

editablegrid_navigation

Now select Editable Grid from the list and click on Add

eidtablegrid_addcontrol

Editable Grid Control added defaulted to read only on Web, Phone and Tablet

editablegrid_control_configuration

Select Editable Grid  for the platform of your choice. Click Save and Publish.

Click Events to add JScript event on grid.

editablegrid_jscript

Job Done!!!

Sub Grids can be configured to be Editable including Events;

editabelgrid_subgrid

Grouping and Sorting can be performed based the visible fields on the view;

editablegrid_grouping

editablegrid_grouping2

Switch between Read Only and Editable Grid using SHOW AS command;

editablegrid_switch

Hope this helps!!! Happy Blogging!!!

Microsoft Dynamics CRM 2013 and CRM 2015 Server-Side Synchronization – Allow Setting Credentials on Nonseecure Channel

Dynamics CRM 2013 and Dynamics CRM 2015 by default doesn’t allow save credentials in email server profile and mailboxes records if SSL is not used i.e. if you are running CRM on HTTP instead of HTTPS and if you select “Credentials in Email Server Profile” or “Credentials Specified by a User or Queue” then you get following error.

“You can’t set the user name and password in this email server profile and its associated mailboxes because the Microsoft Dynamics CRM server requires using a secure mode (SSL) to specify credentials. Use another mode of authentication, or contact the Microsoft Dynamics CRM server admin to allow setting credentials on a nonsecure channel.”

ServerProfileError

and CRM disable credentials fields (User Name and Password)

credentials fields disabled

At the time of Dynamics CRM 2011 with Email Router we used to add the registry key called “DisableSecureDecryptionKey” under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and set value to 1 but now this doesn’t do the trick anymore.

In Dynamics CRM 2013 this can be done by adding the new dword value registry key with name “AllowCredentialsEntryViaNonSecureChannels” under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and set value to 1.

However it is quite commonly noticed that creating a new registry key is not a solution and this has to be done through PowerShell script and that helped to resolve the problem.

If you know how to use power shell. Here are the steps to create this key and value;

 Add-PSSnapin Microsoft.Crm.PowerShell
$mycred = Get-Credential
$dwsurl = "http://xxxxxxxxxxxxxxx:5555"
$setting = Get-Crmsetting -settingtype ServerSideSyncEmailSettings -credential $mycred -dwsserverurl $dwsurl
$setting.AllowCredentialsEntryViaNonSecureChannels=$True
Set-CrmSetting $setting
Get-CrmSetting TraceSettings

Later when SP1 for CRM 2013 released and in CRM 2015, “AllowCredentialsEntryViaNonSecureChannels” registry key stopped working. Instead this part of functionality is controlled through two deployment properties “AllowCredentialsEntryViaInsecureChannels” and “ECAllowNonSSLEmail”.  These setting are within the DeploymentProperties table within the MSCRM_CONFIG database (please see more details in later part of this blog) and can be changed using following PowerShell commands.

To allow the saving of credentials when SSL is not used, run the following PowerShell commands:

add-pssnapin Microsoft.Crm.Powershell
$itemSetting = new-object ‘System.Collections.Generic.KeyValuePair[String,Object]'("AllowCredentialsEntryViaInsecureChannels",1) 
$configEntity = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$configEntity.LogicalName="Deployment"
$configEntity.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$configEntity.Attributes.Add($itemSetting) 
Set-CrmAdvancedSetting -Entity $configEntity

To allow the use of connections to servers that do not use SSL, run the following PowerShell commands:

add-pssnapin Microsoft.Crm.Powershell
$itemSetting = new-object 'System.Collections.Generic.KeyValuePair[String,Object]'("ECAllowNonSSLEmail",1) 
$configEntity = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$configEntity.LogicalName="Deployment"
$configEntity.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$configEntity.Attributes.Add($itemSetting) 
Set-CrmAdvancedSetting -Entity $configEntity

Although Microsoft recommends to use above PowerShell script to make changes to above two deployment properties however if you are not PowerShell expert and if you are getting any unexpected errors then you can update these properties by updating Deployment Properties directly into database. (Note: direct database update is not supported by Microsoft, so please make sure you take backup of the database)

To allow the saving of credentials when SSL is not used, run the following SQL statements in SQL Management Studio:

select ColumnName,BitColumn from DeploymentProperties
where ColumnName = 'AllowCredentialsEntryViaInsecureChannels'
Update DeploymentProperties
Set BitColumn = 1
Where ColumnName = 'AllowCredentialsEntryViaInsecureChannels'

To allow the use of connections to servers that do not use SSL, run the following SQL statements in SQL Management Studio:

select ColumnName,BitColumn from DeploymentProperties
where ColumnName = 'ECAllowNonSSLEmail'
Update DeploymentProperties
Set BitColumn = 1
Where ColumnName = 'ECAllowNonSSLEmail'

Note:

A guide to using PowerShell with Dynamics CRM can be found on MSDN (here) which has a number of useful of cmdlets for administrating a Dynamics CRM Deployment.

Please click here if you wish to find more about server-side synchronization.