Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

WebTemplate returning Liquid error: Exception has been thrown by the target of an invocation.

$
0
0

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 %}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images