SELECT ak.entitylogicalname,
ak.logicalname,
ak.entitykeyindexstatus
FROM metadata.alternate_key AS ak
WHERE ak.entitykeyindexstatus = 'Failed';
When I run this SQL I get the below error:
The formatter threw an exception while trying to deserialize the message:
There was an error while trying to deserialize parameter http://schemas.microsoft.com/xrm/2011/Contracts/Services:request.
The InnerException message was 'Error in line 1 position 1542.
Element 'http://schemas.microsoft.com/xrm/2011/Metadata/Query:Value' contains data from a type that maps to the name 'http://schemas.microsoft.com/xrm/7.1/Contracts:EntityKeyIndexStatus'.
The deserializer has no knowledge of any type that maps to this name.
Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'EntityKeyIndexStatus' and namespace 'http://schemas.microsoft.com/xrm/7.1/Contracts'.'.
Please see InnerException for more details.
When I run this SQL I get the below error: