Dynamics-365-Workflow-Tools icon indicating copy to clipboard operation
Dynamics-365-Workflow-Tools copied to clipboard

CalculateAgregateDate - Wrong date/01-01-1753 returned if no results

Open rskadk opened this issue 3 years ago • 0 comments

When no results are returned with the value output the result 01-01-1753 are returned. If no results are found it need to return "blank". If a result are found the date is returned just fine.

It doesnt matter if i use min og max output.

Im using a standard fetch:

<fetch mapping="logical" distinct="false" version="1.0" aggregate="true" >
  <entity name="msdyn_workorder">
    <filter type="and">
      <condition attribute="msdyn_workorderid" operator="eq" value="{PARENT_GUID}" />
    </filter>
    <attribute name="msdyn_workorderid" groupby="true" alias="acc" />   
    <link-entity name="bookableresourcebooking" from="msdyn_workorder" to="msdyn_workorderid" link-type="inner">
      <attribute name="starttime" aggregate="min" alias="mindate" />
      <filter type="and">
        <condition attribute="new_bookingstatusduplicate" operator="eq" value="690970004" />
      </filter>
    </link-entity>
  </entity>
</fetch>

rskadk avatar Feb 04 '22 13:02 rskadk