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

Notifications

Announcements

No record found.

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
I have the same question (0)
  • 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans