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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

SSRS FetxhXML report passing selected/opened record id

(0) ShareShare
ReportReport
Posted on by 180

Hi,

I have a FetchXML based SSRS report. Which is supposed to show activities at account level. 

My client requirement is to execute this report on an open account record by selecting the report from the ribbon. I have tried to parametrise the report but no luck. Highlighted red below.

How do I pass the open/selected record ID to the report so it executes in the context of that record?

<?xml version="1.0"?>

<fetch distinct="true" mapping="logical" enableprefiltering="true" output-format="xml-platform" version="1.0">

<entity name="activitypointer">

<attribute name="activitytypecode"/>

<attribute name="subject"/>

<attribute name="statecode"/>

<attribute name="prioritycode"/>

<attribute name="modifiedon"/>

<attribute name="activityid"/>
<attribute name="scheduledstart" />
<attribute name="scheduledend" />
<order descending="true" attribute="modifiedon"/>
<link-entity name="activityparty" alias="aq" link-type="inner" to="activityid" from="activityid">
<filter type="and">

<condition attribute="participationtypemask" operator="in">

<value>1</value>
<value>2</value>

<value>3</value>
<value>4</value>
<value>5</value>
<value>6</value>
<value>7</value>
<value>8</value>
<value>9</value>
<value>11</value>

</condition>
</filter>
<link-entity name="contact" alias="con" link-type="inner" to="partyid" from="contactid">
<attribute name="fullname"/>
<attribute name="parentcustomerid"/>
<attribute name="jobtitle"/>
<link-entity name="account" alias="acc" link-type="inner" to="parentcustomerid" from="accountid">
<attribute name="name"/>

<filter type="and">
<filter type="or">
<condition attribute="accountid" operator="eq" value="@CRMID"/>

<condition attribute="parentaccountid" operator="eq" value="@CRMID"/>

</filter>

</filter>

</link-entity>

</link-entity>

</link-entity>

</entity>

</fetch>

Run report on the opened record

pastedimage1636145035034v1.png

When Executing, the following appear so instead of straight run the report in the context of opened record it is still asking for record ID.

pastedimage1636145228498v2.png

Thanks

I have the same question (0)
  • Community Member Profile Picture
    on at

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 143 Super User 2026 Season 1

#2
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 121

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans