Skip to content

Instantly share code, notes, and snippets.

@Cloud-Awesome
Last active June 3, 2021 09:41
Show Gist options
  • Save Cloud-Awesome/ab2879c0bcb12b0952e79310f158b2be to your computer and use it in GitHub Desktop.
Save Cloud-Awesome/ab2879c0bcb12b0952e79310f158b2be to your computer and use it in GitHub Desktop.
{% fetchxml fetch_query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="adx_webpage">
<attribute name="adx_webpageid" />
<attribute name="adx_name" />
<attribute name="createdon" />
<order attribute="adx_name" descending="false" />
<filter type="and">
<condition attribute="adx_name" operator="not-null" />
<condition attribute="adx_isroot" operator="eq" value="1" />
<condition attribute="adx_websiteid" operator="eq" value="{{ request.params('website-id') }}" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% assign results = fetch_query.results %}
[
["Webpage ID", "Webpage Name", "Date Created"],
{% for entity in results.entities %}
{% if forloop.last %}
["{{ entity.adx_webpageid }}","{{ entity.adx_name }}","{{ entity.createdon | date: 'u' }}"]
{% else %}
["{{ entity.adx_webpageid }}","{{ entity.adx_name }}","{{ entity.createdon | date: 'u' }}"],
{% endif %}
{% endfor %}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment