Entity cannot be found error in Dynamics 365 for Outlook App

梦想的初衷 提交于 2021-01-29 08:54:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!