After activation of Release Wave 2022 2 Create and Update of Incident using XrmMockup will cause an exception "Cannot convert DateTime to String"
jacobblom opened this issue · 1 comments
jacobblom commented
The cause of this seems to be a change of type in the calculation of the field "Case Age" (caseage).
The exception is cast regardless of the caseage field is used or not.
Removing this field from the metadata.xml file will solve the problem as a workaround (unless you actually have tests that use this field)
I used this piece of once-of-code to do so:
using System.Xml.Linq;
var filename = args[0];
var content = File.ReadAllText(filename);
var contentXml = XDocument.Parse(content);
var caseageFieldNodes = contentXml.Descendants().Where(x => x.Value == "caseage");
Console.WriteLine($"Number of matching nodes: {caseageFieldNodes.Count()}");
if (!caseageFieldNodes.Any()) return;
caseageFieldNodes.First()?.Parent?.Remove();
var outputContent = contentXml.ToString();
File.WriteAllText(filename, outputContent);
misoeli commented
Resolved in 1.10.1