1

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?

1 Answer 1

0

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.

2
  • Ya i found i can't get this starting from user.But is there any way to split or differentiate the portal users contacts and a normal contact without any user. Sep 18, 2014 at 5:12
  • Unfortunately there is no standard field that differentiates between a portal enabled contact and a non-portal enabled contact. Some orgs have added a custom field to Contacts to help facilitate that capability. Others use record types, but I wouldn't recommend that approach as it can conflict with or further complicate the use of record types they may be using for other reasons.
    – crmprogdev
    Sep 18, 2014 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .