question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GUID Problem (Create/Update)

See original GitHub issue

Hi;

I’m getting an error when Creating/Updating a form with a uniqueidentifier ID (GUID). The list handler works fine if I create a row directly from SQLServer. My Json (fiddler to the rescue:) ) looks something like this {“Entity”:{“xyzId”:“f78b4b2b-7ff2-4c3f-b984-55de933653cc”,“xyzField”:“125”,“TenantId”:1}}.

This is the error :

Details=System.FormatException: Unrecognized Guid format.

at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)

at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result)

at System.Guid.Parse(String input)

at Serenity.Data.GuidField.ValueFromJson(JsonReader reader, Row row, JsonSerializer serializer) in C:\Projects\Serene\Serenity\Serenity.Data.Entity\FieldTypes\GuidField.cs:line 53

at Serenity.Data.JsonRowConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in C:\Projects\Serene\Serenity\Serenity.Data.Entity\Row\JsonRowConverter.cs:line 109

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)

at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)

at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)

at Serenity.Services.JsonFilter.OnActionExecuting(ActionExecutingContext filterContext) in C:\Projects\Serene\Serenity\Serenity.Web\Mvc\JsonFilter.cs:line 55

at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)

at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()

at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)

at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()

at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters)

at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:26 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
volkanceylancommented, Apr 5, 2016

Please update to 1.9.28, just found an error with JSON serialization, but it shouldn’t give error you wrote, should say something like SomeId field is required. Are you manually entering guids?

0reactions
107295472commented, Apr 6, 2016

okay

Read more comments on GitHub >

github_iconTop Results From Across the Web

GUID Problem (Create/Update) · Issue #517 · serenity-is/ ...
Hi;. I'm getting an error when Creating/Updating a form with a uniqueidentifier ID (GUID). The list handler works fine if I create a...
Read more >
[Solved] guid problem in update
Hi i have a guid abcde and i have id in table guid i want to make an update but doesn works. ......
Read more >
How can I fix error (The property 'Guid' cannot be ...
Any help would be appreciated. Side note: The SQL user is configured with read only access. I have no need to create, update,...
Read more >
Generate GUID in each repositories create method?
Say I wanted to use a GUID for all of the entity IDs. Where would I put the following logic: entity.id = Guid.NewGuid();....
Read more >
Known limitations and troubleshooting with virtual tables
This article describes the known limitations and troubleshooting tips when working with virtual tables in Microsoft Dataverse.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found