Hi Everyxone!
I have a custom plug-In for Dynamics CRM 365 online and get a validation error:
"A validation error occurred. The value of 'justANumberField' on record of type 'entity' is outside the valid range."
To fix it, I tried to debug, but as soon as debug is active the error is not accurrring.
The PlugIn-Registration-Tool works fine, I am able to debug and go through the code step by step, but no exception :O
May anybody help and point me into right direction? I am new to this....
Thanks for reading
*This post is locked for comments
Hi!
Thanks - but the value is in the range - our posts where at the same time. I had to change the decimal format to en-US.
Thanks again
Hi,
This error is due to field data exceeding the allowed range. Please check minimum and maximum range allowed for that field using field properties and make sure to have the data within the allowed range.
Found a solution:
I change the Language-Setting from "de-DE" (german) to "en-US" for the decimal-Format - now it works fine.
Any suggestion, why? Can't I use the german format here?
And I am still keen to know why this exception only occured not in debug mode..
Thanks again I set this to solved but I am very greatful for further information.
Does this help you?
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.CreateInternal(Entity entity, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters)
at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.CreateOrganizationResponse(Entity entity)
at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context, String edmEntityName, EdmEntityObject entityObject, Boolean isUpsert)
at Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySetImplementation(String& entitySetName, EdmEntityObject entityObject)
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
Hi!
Just debugged again and the value that is assigned is '25.00000000000000000000M'.
I tried to convert by Math.round but the same exception.
And again, while debuigging it works fine, just after uninstalling profiler exception is thrown.
Thanks again
And what is the decimal you are trying to use
Sorry, my mistake - in fact, the max is 1.000.000.000,00
Hi!
Thanky you for your reply!
It is a decimal between 0,00 and 1000000,00.
Does this help?
what is the number? and under the definition for that field in the solution what is the minimum and maximum?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156