I am trying to create report to relate portal user and its contact who have campaign history.I'm able to relate contact and portal user but i couldn't get campaign history result.I created a report type like Users->Contacts(modified by)->campaign history->campaign member.Can anyone help me out to get the result?
I don't think you can get what you desire by starting from
User. I think you need to start from
Contacts. I took a look at the relationships Ajax Tools Explorer and this is the query I came up with to get you in the ballpark starting from Contacts which you can get as
User.contactId. Note that CampaignMembers is a subquery.
SELECT Id, Name, LeadSource, Account.Id, Account.Name, Owner.Id, Owner.Name, (SELECT Id, CreatedDate FROM CampaignMembers) FROM Contact Where Contact.Id = User.Contact.Id
You might want to play with the new query builder to see if there's another way to reach what you're looking for, but I don't think you're going to do it beginning with the
User Object. Starting someplace in the middle, you may be able to work your way to each of the ends you want to reach. That might tell you how to extract the information you seek from your report.