Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

SSRS FetxhXML report passing selected/opened record id

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

  • Community Member Profile Picture
    Community Member Microsoft Employee 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans