cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

Need to store the Date field , based on codition if it is modified new value and if no change in value keep the same value, but this is not happening, i have tried if(condition,'new value',null''), but if i am not putting the value into the field '' the json on save shows "field_questionduedate":null, please help. I believe this is a bug with the microsoft Flow for DateTime fields.

Null values not saved crashing the Flow (saving some hard coded value for date is not the solution.)

Even tried to pass the Null value through "JSON-OBJECT"

{

"DueDate":null

}

if no changes is made into the field it is saved as null, withount any issue.
Default no value and date is savedDefault no value and date is saved"message": "An error occurred while validating input parameters: Microsoft.OData.ODataException: Cannot convert the literal '' to the expected type 'Edm.DateTimeOffset'. ---> System.FormatException: The string '' is not a valid AllXsd value.\r\n   at System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds)\r\n   at System.Xml.XmlConvert.ToDateTimeOffset(String s)\r\n   at Microsoft.OData.PlatformHelper.ConvertStringToDateTimeOffset(String text)\r\n   at Microsoft.OData.ODataPayloadValueConverter.ConvertStringValue(String stringValue, Type targetType)\r\n"message": "An error occurred while validating input parameters: Microsoft.OData.ODataException: Cannot convert the literal '' to the expected type 'Edm.DateTimeOffset'. ---> System.FormatException: The string '' is not a valid AllXsd value.\r\n at System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds)\r\n at System.Xml.XmlConvert.ToDateTimeOffset(String s)\r\n at Microsoft.OData.PlatformHelper.ConvertStringToDateTimeOffset(String text)\r\n at Microsoft.OData.ODataPayloadValueConverter.ConvertStringValue(String stringValue, Type targetType)\r\n'' is not null for date.'' is not null for date.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate III
Advocate III

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

Thanks for the repsonse, 

One request can't you generate a Bug / Ticket for this issue as this is very genuine case. The field is optional Flow should also provide same interface as we get in CRM dynamics instance.

 

As you people can also see this is genuine reason.

Acknowledge this as a bug, as the output is going to crash the flow .

 

View solution in original post

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

Hi @gunjan,

 

Does your problem still exists?

 

Could you please share a full screenshot of the configuation of your flow?

Could you please share a details about your scene?

Could you please share the details of your "If" expression?

The if "If" expression that you provided as below is n't a valid expression:

if(condition,'new value',null'')

 

I have made a test on my side to save null value into data field in sharepoint and don't have the issue that you mentioned.

 

Please share more details so we could provide a proper workaround for you.

 

 

Best regards,

Alice

Highlighted
Advocate III
Advocate III

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

Thanks for Your reply, sharing my schenario with you , one important thing i am not able to use null value into DATETIME field in the CRM Dyanmics instance.

I am not able to save a null value into the field of type DATETIME.

 

the if condition is  

if(equals(variables('QueDueDate'),''),null,variables('QueDueDate')) but this fails everytime.
 
Even some person from MS Community Support System Acknoledge the same issue...
 
if_condition.pngissue_is_same.png
Highlighted
Community Support
Community Support

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

Hi @gunjan,

 

 

I have made a test on my side ,as @Anonymous said in the link that you provided,we could not save a null value into a Date column of Dynamics 365 entity.

 

There is no way to save a null value into a Date column of Dynamics 365 entity using Microsoft Flow currently.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

 

Best regards,

Alice

Highlighted
Advocate III
Advocate III

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

Thanks for the repsonse, 

One request can't you generate a Bug / Ticket for this issue as this is very genuine case. The field is optional Flow should also provide same interface as we get in CRM dynamics instance.

 

As you people can also see this is genuine reason.

Acknowledge this as a bug, as the output is going to crash the flow .

 

View solution in original post

Highlighted
Regular Visitor

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

I can't believe I struggled with this for 2 weeks and MS was notified of this bug in 2018.  @v-yuazh-msft Can we get an update on when this bug will be fixed?

Highlighted
New Member

Re: Not able to save null value into date field(CRM DYNAMICS instance). Via Flow

I just found this workaround.  Works a treat to null a D365 datetime

 

https://www.cloudfronts.com/clear-datetime-field-using-ms-flows/

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (8,268)