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

Notifications

Announcements

No record found.

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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans