2

I am using the request to GET "/api/data/v9.0/EntityDefinitions" to list all the entities that are present in Dynamics. But the problem is that I cannot find which field indicates that this entity is system.

Can anyone provide me with a solution to this minor issue?

Pavlo Mykhailyshyn
  • 203
  • 1
  • 6
  • 20
  • 1
    I'm still not sure exactly what you are trying to do, why do you need this information? What is the larger problem you are trying to solve? – James Wood Jun 13 '19 at 08:51
  • I do not want to fetch system entities (send extra request to do this). My main purpose is to filter out these entities. The next problem is the entity I have created by my own marked as Custom too. According to this article tutorialspoint.com/microsoft_crm/… I have created entity called "Employer". After querying metadata info about this entity, the field IsCustomEntity equal "true". So your suggestion does not work as I expect. – Pavlo Mykhailyshyn Jun 13 '19 at 09:05

5 Answers5

2

I just verified in XrmToolBox - Metadata browser plugin, there are more than 400+ System entities (non-custom) available per IsCustomEntity filter. You can connect to the environment, pull the metadata, move the columns you needed, export to Excel for analysis.

Along with my original custom entities, some LinkedIn integration entities & msdyn prefix entities are also marked as non-system (custom) entities. So you have to use James mentioned IsCustomEntity property to filter out the system entities.

enter image description here

Query to exclude system entities metadata while fetching:

api/data/v9.0/EntityDefinitions?$filter=IsCustomEntity eq true

  • The problem is how can I filter out entities that I created by my own (these entities marked as Custom too). – Pavlo Mykhailyshyn Jun 13 '19 at 06:42
  • According to this article https://www.tutorialspoint.com/microsoft_crm/microsoft_crm_entities_and_records I have created entity called "Employer". After querying metadata info about this entity, the field IsCustomEntity equal to "true". – Pavlo Mykhailyshyn Jun 13 '19 at 07:05
1

EntityMetadata EntityType

Entity Set Path [organization URI]/api/data/v9.0/EntityDefinitions


IsCustomEntity Edm.Boolean Whether the entity is a custom entity.

James Wood
  • 17,286
  • 4
  • 46
  • 89
  • IsCustomEntity does not mean that it is system entity. I can create custom entity and a lot of records and it is does not mean that all this records will be system – Pavlo Mykhailyshyn Jun 12 '19 at 13:17
  • 1
    @PavloMykhailyshyn then explain what do you mean with "system" – Guido Preite Jun 12 '19 at 14:36
  • @PavloMykhailyshyn Not 100% sure what you mean. But if `IsCustomEntity` is `false` then its a system entity. – James Wood Jun 12 '19 at 14:40
  • According to this title https://crmbusiness.wordpress.com/tag/system-entities/ There mentioned that there is system entities ("System entities cannot be deleted") and I want to know which entities are system, to not send extra request to fetch records? – Pavlo Mykhailyshyn Jun 12 '19 at 14:57
  • 1
    @PavloMykhailyshyn as other said you need to check the property IsCustomEntity, and if system or custom has nothing to do in how to fetch the records – Guido Preite Jun 12 '19 at 17:25
0

Below conditions justify that the entity in CRM is System entity or not.

IsCustomizable.Value == false && IsCustomEntity == false

We need to check both IsCustomizable and IsCustomEntity property and both should be false then the entity is said to be System entity.

RR20
  • 28
  • 3
0

There are some good answers here regarding metadata and related tools. At the end of the day, the most straightforward way to determine whether an entity is your custom entity is to look at the prefix.

For example, if I have a custom solution where my prefix is "zm_", then I could retrieve entity metadata filtering for those records where the entity schema name starts with "zm_"

Zach Mast
  • 1,698
  • 1
  • 10
  • 17
0

In Order to get the custom Entities created by user check

IsCustomEntity == true AND IsCustomizeable.Value == true AND IsCustomizable.CanBeChanged == true

pawas
  • 1
  • 1
  • 2