Filter dateformat issue in Dynamics Fetchxml RRS feed

  • Question

  • Dynamics fetchxml failing dataformat issue which is source from filter. Any advise on this 

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="appointment">
        <attribute name="subject" />

       <attribute name="bu_abandoned" />

    <filter type="and">
     <condition attribute ="modifiedon" operator="gt" value="@formatDateTime(activity('Filter1').output.value,'YYYY-MM-DD')"/>

    { "errorCode": "2200", "message": "Failure happened on 'Source' side. ErrorCode=UserErrorDynamicsOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Dynamics operation failed with error code: -2147220935, error message: The date-time format for @formatDateTime(activity('Filter1').output.value,'YYYY-MM-DD') is invalid, or value is outside the supported range..,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'", "failureType": "UserError", "target": "Copy Appointments" }

    filter1 output

    { "ActivityRunId": "8168d478-89d7-4c4e-b2cc-837334867e55", "Status": "Succeeded", "Error": { "Message": "", "ErrorCode": "" }, "Output": { "ItemsCount": 2, "FilteredItemsCount": 1, "Value": [ { "account_md": "2018-09-05T13:18:01Z", "tname": "bb" } ] } }

    Wednesday, September 5, 2018 3:45 PM

All replies

  • Hi,

    The error indicates "@formatDateTime(activity('Filter1').output.value,'YYYY-MM-DD')" wasn't been translated to real datetime value before sending request to Dynamics service. Instead, this Verbatim string got send to Dynamics service which results in date-time format error.

    Could you please double check whether your pipeline parameter works as expected? Did you try it in Madrid?

    Thursday, September 6, 2018 2:10 AM
  • <filter type="and">
    <condition attribute ="modifiedon" operator="gt">
    Please have a try with above

    Thursday, September 6, 2018 2:11 AM