function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How do I reference a Rollup Field from the Opportunity Object on the Campaign Object

Hi all,


Is it possible to reference a rollup field from the Opportunity Object while on the Campaign Object?


I created a VF page using APEX on the Campaign object and I would like to Rollup the values from an Opportunity Field for all of the Campaign Opportunities.


The field is a rollup field called Total Value of Won Contract on the Opportunity.  It takes the Term x Amount for won Opportunties.


The Campaign field would be called "Campaign TVC".





in apex you can access and modify any field:-

1. If is it linked to the object in context

2. Is not a read-only field


So if the field you are talking about is a standard rollup field of datatype summary field then you can access if it is linked to the another object in context but cannot modify it.

If it is only rollup in functionality and not in datatype , then you can modify it too.


Also you can make use of ecclipse IDE to find out if a field is creatable, queryable, editable or not.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.