web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Insert null value in DateTime field through an action

(0) ShareShare
ReportReport
Posted on by 10

I try to insert an empty value for a DateTime field. This field is optional in my action. 

I call this action from a Logic App, through the HTTP Post step. In my body I have valid Json including the field: (this is a part of the complete message)

{

"enddate":""

}

With all kinds of alternatives I tried, but every time I get tis error:

DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/0001 00:00:00, Minimum value supported: 01/01/1753 00:00:00"
In my Action this is the error message: (which is actually the same error)
Sync workflow failed with error message - Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/0001 00:00:00, Minimum value supported: 01/01/1753 00:00:00
  • Guido Preite Profile Picture
    54,086 Moderator on at

    try to write null instead of ""

    so

    {

    "enddate": null

    }

  • RobJoosen Profile Picture
    10 on at

    Hi Guido,

    Thanks,

    I have tried :

    -"enddate": ""

    -"enddate": null

    -"enddate": null as expression

    - leave enddate out as parameter

    All with the same result.

    The only thing that works as a workaround is to use the Coalesce function and fill the date with a value of 1753-01-01 and use a post-action to clear this date. But I think that's a very dirty way of working.

  • Giorgio Zanoni Profile Picture
    74 on at

    Hi,

    I guess that the problem is that DateTime is not nullable and the default value is 01/01/0001.

    You can add a new field in the action to distinguish if the datefield is filled or not and consequently update the CRM entity.

    So:

    1. if the new filed "datepassed" is true and the field "enddate" is equal 01/01/0001 this means that in the action you have to pass "enddate" = null in the attribute collection, if "enddate" is <> 01/01/0001 you have to add "enddate" with the new datetime value

    2. if the new filed "datepassed" is false you don't have to add "enddate" attribute to the collection.

    It seems to be a mess but it should work... ;-)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 98 Most Valuable Professional

#2
11manish Profile Picture

11manish 77 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 39

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans