Monday, July 13, 2015

List of all custom fields names & types for any Custom Entity - Dynamics CRM On-Premises

For getting a list of all custom fields names and types for any Dynamics CRM (On-Premises) custom entity, run below SQL script using SQL Server Management Studio :

USE [CRMDatabaseName]

SELECT c.NAME
 ,t.NAME
FROM syscolumns c
INNER JOIN sys.types t ON t.system_type_id = c.xtype
WHERE id = object_id('CustomEntityTableName')
 AND c.NAME LIKE 'new_%'


Note : Replace new with your solution prefix  :)
          Remove (and c.name LIKE 'new_%') for getting all of custom and system fields.

1 comment:

Unexpected Error When Replying or Forwarding an Email

Recently came across an interesting issue from one of my clients, they were working fine since around 2 years ago with no issues, using Dyn...