Hello, I have a design that generically supports different types of entities. This design involves passing an ObjectTypeCode parameter as part of a request to a manager class.
So, for example, if a request with ObjectTypeCode = 112 is passed to the manager class then the manager class treats the request as an incident request because CRM defines an incident as having ObjectTypeCode 112.
I'm having problems using a QueryExpression for this. When I try to query "entity" or "entityview" through a QueryExpression, CRM returns the following error message:
The entity with a name = '[entityname]' was not found in the MetadataCache
Do you have any recommendations that I can follow to query an entity name by ObjectTypeCode?
*This post is locked for comments