Turns out that the Dynamics 365 connector is not behaving the way most of us would expect. Leaving the field blank will not change the value. If you add any value into the date field other than a date field, the action will fail.
The way to do it is by using the following steps:
- Add a Convert time zone action. If you're not actually converting the time, then set the Source time zone and Destination time zone to be the same.
- Assign the Base Time you want for the field. If you want to clear it out, set it to the null expression. null will cause the time conversion operation to fail, but still creates a time object.
- In the action immediately following the Convert time zone action, set the Configure run after to run after success and failure.
You will need to do this for every date field that you may want to reset.
@Haniel - I have tried this and it failed with below error. Can you advise me please?
ReplyDeleteUnable to process template language expressions for action 'Convert_time_zone' at line '1' and column '2065': 'In function 'converttimezone', the value provided for date time string '' was not valid. The datetime string must match ISO 8601 format.'.
Thanks
Arjun
Can you share a sample of your flow?
DeleteAWSOME, it worked for me in combination with Microsoft Logic Apps
ReplyDeleteYes, Power Automate (Microsoft Flow) is based on Logic Apps so this logic works on both platforms.
DeleteThank you for this workaround. I have used it also in Logic Apps for resetting DateTime fields... Can't believe we need to get this dirty to make something this simple that should have been available by default.
ReplyDeleteLike many other platforms, this is an ongoing works in progress :)
Delete