web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 (0)
  • Portalguy Profile Picture
    205 on at
    RE: WebTemplate returning Liquid error: Exception has been thrown by the target of an invocation.

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans