Using a CRM plugin you can manipulate the data returned by CRM before the data is returned to the user in the grid/sub-grid.

Some examples would be:

  • Deny the user access to specific data in a specific field based on a security role
  • Get data from a lookup record on a related entity and display it dynamically on the grid.

Create your new plugin class and register it on the RetrieveMultiple message, select your entity and keep the stage of execution as Post operation

Get your entity collection:

 You can run your own queries and add your own logic, then to set the column value for the grid use:

You will need to have a ‘dummy’ field on your entity to be used to display the data however this field will always be empty.

The field will also need to exist in the view or in the columnset retrieval.

This does not update the value in the database rather just a dynamic way of displaying data from another entity.