SSRS User Story-8: Create a SSRS report on the Opportunity entity, show the source lead and campaign details.
Entities:
·
Opportunity
·
Lead
· Campaign
· Need to Create Run Report Button in Opportunity entity
Create Campaign Record:
Create
Lead record: Create a lead record and choose Source campaign as
above created campaign.
Click on lead qualify button
then lead is converted into opportunity.
Opportunity record:
Note: Run report button is not available in Opportunity
entity form.
Need to Create Run Report Button
Need to create one solution and add account entity and opportunity entity
Solution creation:
Adding entities into solution:
Open XRM Tool box and
create Button:
Here copy the Run Report Button from account entity
Paste the Run report button on Opportunity entity
Fetch Xml for retrieving lead and campaign details from opportunity entity
Fetch Xml code:
<fetch
version="1.0"
output-format="xml-platform"
mapping="logical"
distinct="false">
<entity
name="opportunity" enableprefiltering="1">
<attribute
name="name"
/>
<attribute
name="customerid"
/>
<attribute
name="estimatedvalue"
/>
<attribute
name="statuscode"
/>
<attribute
name="opportunityid"
/>
<order
attribute="name"
descending="false"
/>
<filter
type="and">
<condition
attribute="originatingleadid"
operator="not-null"
/>
<condition
attribute="campaignid"
operator="not-null"
/>
</filter>
<link-entity
name="campaign"
from="campaignid"
to="campaignid"
visible="false"
link-type="outer"
alias="a_c722b4e9a6ffee119f8a000d3a0a7bb6">
<attribute
name="name"
/>
<attribute
name="typecode"
/>
<attribute
name="budgetedcost"
/>
</link-entity>
<link-entity
name="lead"
from="leadid"
to="originatingleadid"
visible="false"
link-type="outer"
alias="a_9ed298dfa0ffee119f8a000d3a0a7bb6">
<attribute
name="customerid"
/>
<attribute
name="fullname"
/>
<attribute
name="jobtitle"
/>
</link-entity>
</entity>
</fetch>
Report Creation in Visual Studio:
Design:
Output:
Adding SSRS Report into CRM:
Open the Opportunity record and click on Run Report
Comments
Post a Comment