Dynamics has a limit on the number of Rollup fields that can be created of 10 per entity, and 100 per environment. Recently the question came up regarding how many rollup fields have already been created for a particular environment, and how many more we can create for certain entities. The following show one way to get this information.

When a Rollup Field is created in Dynamics, related support fields are also created that allow Dynamics to keep track of the time the field value was last calculated, and the status of the calculation. The table below show the details and naming of these related fields, when creating a rollup field called <Field Name>.

Therefore, to locate all rollup fields on the system, we can look instead for these support fields using the naming patterns.

One way to list these fields is using XMR Toolkit, with the “SQL 4 CDS” tool, which allows for querying the metadata of the environment, such as all field names and descriptions. After connecting to the environment, and opening the tool, the Object Explorer on the left shows the location of the attributes table.

SELECT entitylogicalname, logicalname, displaynameFROM [].metadata.attributeWHERE displayname LIKE ‘% (Last Updated On)’

Note that will need to be replaced with the actual Database Name.

When this query is run, it will create a list of fields related to all the rollup fields in the environment, and the related parent entity.