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/
Visualizzazione post con etichetta ODATA. Mostra tutti i post
Visualizzazione post con etichetta ODATA. Mostra tutti i post
venerdì 5 gennaio 2018
giovedì 4 gennaio 2018
D365FFO: The underlying connection was closed: An unexpected error occurred on a send when try to connect ODATA to UAT or PROD report error
As reported here https://community.dynamics.com/ax/f/33/t/227417
When you try to connect to UAT or PROD environement using ODATA the system will report this error: The underlying connection was closed: An unexpected error occurred on a send
Adding this line of code on connection
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
When you try to connect to UAT or PROD environement using ODATA the system will report this error: The underlying connection was closed: An unexpected error occurred on a send
Adding this line of code on connection
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
venerdì 22 dicembre 2017
D365FFO: Importing customers using data entity does not init value from customer group
Importing customers using dataentity does not init data from customer group, for example Payment Terms does not automatically inizialized from group.
This extension on CustCustomerEntity data entity will fix that problem
[ExtensionOf(dataentityviewstr(CustCustomerEntity))]
final class CustCustomerEntity_Extension
{
[DataEventHandler(tableStr(CustCustomerEntity), DataEventType::MappedEntityToDataSource)]
public static void CustCustomerEntity_onMappedEntityToDataSource(Common _sender, DataEventArgs _eventArgs)
{
CustCustomerEntity custCustomerEntity = _sender;
DataEntityContextEventArgs dataEntityContextEventArgs = _eventArgs;
DataEntityDataSourceRuntimeContext _dataSourceCtx = dataEntityContextEventArgs.parmEntityDataSourceContext();
if (_dataSourceCtx.name() == dataEntityDataSourceStr(CustCustomerEntity, CustTable))
{
CustTable custTable = _dataSourceCtx.getBuffer();
custTable.initFromCustGroup(CustGroup::find(custTable.CustGroup));
}
}
}
Apply to D365FFO Platform Update 11 Spring 2017
This extension on CustCustomerEntity data entity will fix that problem
[ExtensionOf(dataentityviewstr(CustCustomerEntity))]
final class CustCustomerEntity_Extension
{
[DataEventHandler(tableStr(CustCustomerEntity), DataEventType::MappedEntityToDataSource)]
public static void CustCustomerEntity_onMappedEntityToDataSource(Common _sender, DataEventArgs _eventArgs)
{
CustCustomerEntity custCustomerEntity = _sender;
DataEntityContextEventArgs dataEntityContextEventArgs = _eventArgs;
DataEntityDataSourceRuntimeContext _dataSourceCtx = dataEntityContextEventArgs.parmEntityDataSourceContext();
if (_dataSourceCtx.name() == dataEntityDataSourceStr(CustCustomerEntity, CustTable))
{
CustTable custTable = _dataSourceCtx.getBuffer();
custTable.initFromCustGroup(CustGroup::find(custTable.CustGroup));
}
}
}
Apply to D365FFO Platform Update 11 Spring 2017
Iscriviti a:
Post (Atom)
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...
-
When your code run on CIL remember to set to null any enumerator of Sets or Maps before made a change on it. If the enumerator is not restor...
-
The error you're encountering, "The request was aborted: Could not create SSL/TLS secure channel," can occur due to various re...
-
NumberSeq numberSeq; InventTransferTable inventTransferTable; InventTransferLine inventTransferLine; InventDim inventDim; ; ttsbegin; ...