Based on querystring I need to change FetchXML filters for dynamics portals using liquid. I tried below but it throws exceptin; Unknown tag 'endif'. Please help to make the filters dynamic.
{% fetchxml fetchActivities %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="xyz_testentity">
<attribute name="xyz_testentityid" />
<attribute name="xyz_name" />
<order attribute="xyz_name" descending="false" />
<filter type="and">
{{% if {{ RecordId }} %}}
<condition attribute="xyz_tempattr" operator="eq" value="{{RecordId}}" />
{% else %}
<condition attribute="xyz_tempattr" operator="not-null" />
{% endif %}
</filter>
</entity>
</fetch>
{% endfetchxml %}
Fix this snippet, you have double curly for
if
:Correct code: