demianrasko / Dynamics-365-Workflow-Tools

Dynamics 365 Workflow Tools is a Community solution that expands Microsoft Dynamics 365 (CRM) Workflow features with lots of new posibilities. This helps you to build very advanced Codeless solutions in CRM.
Microsoft Public License
466 stars 222 forks source link

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

Open rskadk opened 2 years ago

rskadk commented 2 years ago

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>