2
votes

I am building a ssrs report for crm 2011 using fetchxml.

I have a table to show all open activities for a user. I want to be able to show the Account the activity is related to.

I am able to do this if the regarding field is set to the account but if it is set to contact, opportunity, email... I am unable to find the account that it is associated to.

Is there any way to look up relations with fetch that are more than one level deep?

Any suggestions on how to handle this?

1
Are you asking how to write a FetchXml statement to lookup the account of an activity, if it is a contact, or opportunity? Or are you asking how to combine all of those different entities lookups into a single field on the report?Daryl

1 Answers

1
votes

When you go to generate your FetchXML, via Advanced Find, scroll down to the "Related" section; it's in the same place where you are picking your fields.

So for example, you select Contacts under the "Look for:" drop-down, under that is another drop-down, select it and scroll-down to the related section and pick Accounts.

If there is an entity that is not in that related list you will need to create a relationship. This shouldn't be done on-the-fly; it requires thought since you'll be messing with the database schema.

Cheers