When developing code and queries in Dynamics 365, it is important to use the Entity logical name or schema name when referring to entities, as these values are unique and maintain consistency between instances. It is never a good idea to refer to the Entity type code as its value can vary in different instances resulting in potential issues with your code.
This issue will not occur for system entities as Microsoft reserved all Entity type code values below 10000 for system entities. However, values greater than or equal to 10000 can correspond to any custom entity and there is no guarantee that they are same between instances. Due to this, it is always best to use the Entity logical name or schema name when referring to entities.

Like
Report
*This post is locked for comments