venerdì 5 gennaio 2018

D365FFO: System.InvalidOperationException. Only properties of simple type can be key properties.

Actually there is a Know BUG if you use ODATA references from NUGET.


If a data entity has an enum type field on the entity primary key, the system will report this error:


An unhandled exception of type ' System.InvalidOperationException' occurred in Microsoft.OData.Client.dll
Additional information: The key property 'Type' on for type
'ProductsApp4.Microsoft.Dynamics.DataEntities.LegalEntityContact' is of
type 'System.Nullable`1[[ProductsApp4.Microsoft.Dynamics.DataEntities.LogisticsElectronicAddressMethodType, ProductsApp4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]', which is not a simple type. Only properties of simple type can be key properties.


To resolve the issue, remove NUGET references from the project and use this custom OData dlls: in https://github.com/Microsoft/Dynamics-AX-Integration/tree/master/Packages



Pay attention if you are installing client on OS is Win7 x64 or Vista x64 and you got an error something like that:


{"Could not load file or assembly 'TheAssemblyYouHaveReferenced' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)":"TheAssemblyYouHaveReferenced'}



Refer to this article: https://blogs.msdn.microsoft.com/keithmg/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a/

Nessun commento:

Posta un commento

AX 2012: The request was aborted: Could not create SSL/TLS secure channel

The error you're encountering, "The request was aborted: Could not create SSL/TLS secure channel," can occur due to various re...