You need to sign in to do that
Don't have an account?
jostend
Contact/Opportunity rollup data
What is the best way to show a sum of the product/amount on the contact page? For example, I want to show the account name, opportunity owner, product, sum(amount), account.city, account.state in a list on the contact page.
Unless you are planning on using Opportunity Contact Roles or a custom relationship, the Contact record is ignorant of the Opportunity's existence since both Opportunity and Contact are children of the Account object (one-to-many relationship from Account to Contacts and one-to-many relationship from Account to Opportunities).
The Account information is easy enough to pull down to the Contact record since it is the immediate parent object. To do this, use cross-object formula fields to grab the Account field values into your Contact detail.
Considering that you posted this in the Visualforce area, however, I imagine that you are doing something completely custom with the layouts. Could you elaborate a bit more on how your Visualforce page is (or will be) set up?
I am using Opportunity Contact Roles. Therefore I can see the oppotunities that a contact is responsible for. However, the request I have is to display the opportunity data summarized by product on the contact detail page. I was able to use the roll-up field type at the account level and display on the account page, but I haven't figured out how to do this at the opportunity contact role level and display on the contact page. I was thinking I would have to create a visual force page or an s-control to do this, but if there is an easier way please share. Thanks;
Opp 1 GMT 10,000
Opp 2 GMT 5,000
Opp 3 P2 23,000
I would like to show a summary:
Blue Ridge Co Joe Smith GMT 15,000
Blue Ridge Co Joe Smith P2 23,000
I found an example on how to create a custom object using triggers, but we are using the professional version.