I am trying to call the below Web Template (added to a web page through Page template) to retrieve Notes associated to a particular record (recordid being passed as correlationid). When I run the URL, passing the recordid, I get error as Liquid error: Exception has been thrown by the target of an invocation.
Any Idea what the issue could be?
{% assign correlationid = request.params["correlationid"] %}
{% assign responseformat = request.params["responseformat"] %}
{% if correlationid %}
{% fetchxml my_query %}
<fetch mapping="logical">
<entity name="annotation">
<attribute name="annotationid" />
<attribute name="documentbody" />
<filter type="and">
<condition attribute="objectid" operator="eq" value="{{ correlationid }}" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% endif %}
{% if my_query %}
{% for result in my_query.results.entities %}
{% if responseformat == 'notes' %}
{{ result.documentbody }}
{% else %}
{{ result.annotationid }}
{% endif %}
{% endfor %}
{% else %}
"No Results Found"
{% endif %}
*This post is locked for comments
I have the same question (0)Hi Shruthi
Have you checked that Entity Permissions have been explicitly granted, either on a global or entity-specific level, for the Notes (annotation) entity
Regards
Sumit