Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 143529

FetchXML query with a dynamic value.

$
0
0

I am using a FetchXML query in a workflow to count the number of records with certain criteria. I would like to include the owner of the record on which the workflow was executed as a parameter. Is this possible?

I can filter for "Created on Last Month" and I can do it when adding the GUID in manually. Does anyone have any idea?

Here's an example of the xml below and I included question mark where I'm unsure.

<fetchdistinct="false" mapping="logical" output-format="xml-platform" version="1.0" aggregate="true" >
   <entityname="lead" >
      <orderdescending="false" attribute="fullname" alias="Last_Name" aggregate="count" />
      <filtertype="and" >
          <conditionattribute="createdon" operator="last-month" />
      </filter>
      <link-entityname="systemuser" alias="aa" link-type="inner" to="owninguser" from="systemuserid" >
          <filter type="and" >
              <conditionattribute="systemuserid" operator="in" value="{???????}" />
          </filter>
      </link-entity>
  </entity>
</fetch>


Viewing all articles
Browse latest Browse all 143529


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>