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 :
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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans