web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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 (2)
  • Portalguy Profile Picture
    205 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans