问题
We receive the following error in the Dynamics 365 for Outlook App:
The entity "{0}" cannot be found. Specify a valid query, and try again.
This appears to be associated with custom code.
回答1:
It turns out this was happening because of a call to Xrm.WebApi.retrieveMultipleRecords
. It appears as though in the full web client if you pass in the entity set name (ex. 'accounts') instead of the entity logical name as documented (ex. 'account') as the first parameter, then the web client just passes it through as it's not found in the ENTITY_SET_NAMES
constant.
However, in the app, there is no ENTITY_SET_NAMES
and so my guess is a metadata call is being made on demand to lookup the entity set name and failing because we were passing the set name instead of the logical name.
This appears to have been corrected by switching to the logical name.
来源:https://stackoverflow.com/questions/53728053/entity-cannot-be-found-error-in-dynamics-365-for-outlook-app