{% fetchxml my_query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" returntotalrecordcount="true">
.....
.....
<filter type="and">
<condition attribute="asc_id" operator="eq" uitype="new_uitype" value="{{request.params.id}}" />
</filter>
</link-entity>
</entity>
</fetch>
I am using fetchXML with liquid in web template for ADX portal. The code below works fine when I provide valid ID
{% if my_query.results.entities %}
{{ my_query.results.entities.size }}
{% else %}
<span class="alert">No session found for this booking</span>
{% endif %}
However, when ID is not in CRM i.e. null result I am getting this error
Liquid error: Exception has been thrown by the target of an invocation.
Could you please tell me how to handle null result in Liquid with fetchXML. I have tried following options
{% if my_query.results.entities %}
{% if my_query.results.total_record_count %}
{% if my_query.results %}
all return same error
*This post is locked for comments
I have the same question (0)