You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
Bug Description
If you try to create a record in CRM where a DateTime Field's value is set to any date < 01/01/1753 00:00:00
Then CRM throws an error -
Microsoft.Xrm.Sdk.Entity Exception Details: DateTime is less than minimum value supported by CrmDateTime.
Actual value: {value provided}, Minimum value supported: 01/01/1753 00:00:00
Fake Xrm Easy should behave the same way so that we can write units tests around the functionality.
Currently Fake Xrm Easy does not throw any exception if the provided DateTime Value is less than "01/01/1753 00:00:00"
and works fine(i.e. creates the record) => hence not mimicking the actual behavior of CRM
To Reproduce
//C# Code
private static CrmServiceClient _service;
string url = "**********************"; // e.g. https://yourorg.crm.dynamics.com
string userName = "*****************"; // e.g. you@yourorg.onmicrosoft.com
string password = "********"; // e.g. y0urp455w0rd
string conn = $@"
Url = {url};
AuthType = OAuth;
UserName = {userName};
Password = {password};
LoginPrompt=Auto;
RequireNewInstance = True";
_service = new CrmServiceClient(conn);
var contactToBeCreated = new Entity("contact");
contactToBeCreated["birthdate"] = DateTime.MinValue;
try
{
var recordId = _service.Create(contactToBeCreated);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Expected behavior
An exception should be thrown
"Date is less than the minumum value supported by CrmDateTime. Actual value: 01/01/0001 00:00:00, Minimum value supported: 01/01/1753 00:00:00"
** FakeXrmEasy and Dynamics 365 / CRM version **
FakeItEasy | version="6.0.0"
FakeXrmEasy.9 | version="1.57.1"
D365 - V9.2
The text was updated successfully, but these errors were encountered:
Bug Description
If you try to create a record in CRM where a DateTime Field's value is set to any date < 01/01/1753 00:00:00
Then CRM throws an error -
Microsoft.Xrm.Sdk.Entity Exception Details: DateTime is less than minimum value supported by CrmDateTime.
Actual value: {value provided}, Minimum value supported: 01/01/1753 00:00:00
Fake Xrm Easy should behave the same way so that we can write units tests around the functionality.
Currently Fake Xrm Easy does not throw any exception if the provided DateTime Value is less than "01/01/1753 00:00:00"
and works fine(i.e. creates the record) => hence not mimicking the actual behavior of CRM
To Reproduce
//C# Code
Expected behavior
An exception should be thrown
"Date is less than the minumum value supported by CrmDateTime. Actual value: 01/01/0001 00:00:00, Minimum value supported: 01/01/1753 00:00:00"
** FakeXrmEasy and Dynamics 365 / CRM version **
FakeItEasy | version="6.0.0"
FakeXrmEasy.9 | version="1.57.1"
D365 - V9.2
The text was updated successfully, but these errors were encountered: