Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Calling fetchxml from within an include that is looping results from fetchxml

Posted on by 910

Using a web template to show emails on a portal 8.4, dynamics online 8.2. First fetch is inside an include to get the emails and then i have an include for each email / row. Within that include i want to use fetch to get the attachments. However the second fetch (which is within the looped results of the first fetch) doesn't work - no errors, just doesn't work. Anyone else tried it?

*This post is locked for comments

  • Suggested answer
    PhilKermeen Profile Picture
    PhilKermeen 910 on at
    RE: Calling fetchxml from within an include that is looping results from fetchxml

    So i worked around the problem by using the loading of additional entities in my child include (that draws each row) - this going from the email (which was my original fetch) down to the attachment

                <td>TEST ROW 2 activityid {{row.activityid}}</td>
                <td>{% for e3 in row.email_activity_mime_attachment  -%}
                guid for attachment - {{ e3.id}} {{e3.logical_name}}             </br>
            {% endfor -%}</td>


    From there on in i can create a hyperlink to the file. As per the Stack overflow link i needed to ensure Entity Permissions were in play, chaining down from the email to the attachment.

    Ideas stolen from stackoverflow.com/.../use-liquid-to-reference-field-through-1-n-relationship-in-dynamics-portal-web-pa

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans