CRM Connector A required attribute was outside the valid bounds

Hi there,

I came across another sync error with the CRM Connector. I was sending through values from NAV 2015 to CRM 2015 on a custom entity.

Error:

When sending the data through I got the below error in the connector and event log details as followed. Please remember to enable tracing for the CRM Connector as it is much improved in the latest version 3.4.304.1 (at time of writing).

A required attribute was outside the valid bounds. See the exception message for details. Add the appropriate value to the required attribute.

A validation error occurred.  The value of ‘fieldname’ on record of type ‘entityname’ is outside the valid range.
    — Exception Dump —
    Caught Exception: [Microsoft.Dynamics.Integration.AdapterAbstractionLayer.AdapterException] A validation error occurred.  The value of ‘fieldname’ on record of type ‘entityname’ is outside the valid range.
    Stack trace:
   at Microsoft.Dynamics.Integration.Adapters.Crm2011.CrmObjectProvider.CallCrmExecuteWebMethod(OrganizationRequest request)
   at Microsoft.Dynamics.Integration.Adapters.Crm2011.CrmObjectProvider.CreateNewEntity(Entity entity)
   at Microsoft.Dynamics.Integration.Adapters.Crm2011.CrmObjectProvider.WriteParentEntity(Object value, String queryProperty)
   at Microsoft.Dynamics.Integration.Adapters.Crm2011.CrmObjectProvider.WriteParentEntity(Object value)
   at Microsoft.Dynamics.Integration.Service.Tasks.RecordWork.DoRecordWork(DbMap map, Object key, OperationType operationType, DateTime startTime, String loggingSourceName)

    Inner Exception: [System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]] A validation error occurred.  The value of ‘castle_linenumber’ on record of type ‘castle_condition’ is outside the valid range.
    Stack trace:

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
   at Microsoft.Dynamics.Integration.Adapters.Crm2011.CrmObjectProvider.CallCrmExecuteWebMethod(OrganizationRequest request)

Solution:

The field in question is a whole number field and I am sending data from an Integer value in NAV. The maximum value in CRM was 100. NAV, however, was trying to send through 10000 as a value. Once I increased the maximum value in CRM. The data went through fine.

Hope this helps.

Barry

Leave a comment