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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get Account related post, Activities and Contacts using SSRS .

(0) ShareShare
ReportReport
Posted on by

I want to get Account related post, Activities and Contacts using SSRS. How can I link these 3 tables  with account table

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at
    RE: Get Account related post, Activities and Contacts using SSRS .

    There are several relationships, the most likely are:

    Contacts are related to the account via the contact.accountid or contact.parentcustomerid field, linked to the account.accountid

    Posts are linked via the post.regardingobjectid, linked to the account.accountid

    For activities, there are 2 options:

    1. If the activity is set regarding the account, then use activity.regardingobjectid, linked to the account.accountid
    2. If the link is via other fields (e.g. the to recipient on an email), you also need the activityparty table. You'd link this via activityparty.activityid = activity.activityid and activityparty.partyid = account.accountid
  • innovativeaj Profile Picture
    175 on at
    RE: Get Account related post, Activities and Contacts using SSRS .

    Hi,

    you can simply apply inner joins with all the three entities, select only the columns that you require.

    select * from Account a inner join

    Contact c

    ON a.AccountId = c.AccountId

    inner join ActivityPointer ap

    ON a.AccountId = ap.RegardingObjectId

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Get Account related post, Activities and Contacts using SSRS .

    Hello

    there is regarding field is available in activities and customer field in contact.

    Now you can get records related to a particular account.

    Hope you can understand what I mean!

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans