+ Start a Discussion
vandana rajuvandana raju 

rollupsummary field in trigger

Hi
I am trying to understand data modelling in salesforce.
I have a rollup summary field defined between two custom objects (involved in a Master-detail relationship).
can I access the rollup summary field in a trigger written on child object which will update the parent object field based on some calculation?

any help with a smal piece of code will he greatly helpful.

Thanks
Vandana
Leo10Leo10
Hi Vandana
You can write SOQL Query to get rollup summary field in child like this
select id,Relation__r.ParentRollUpField__c from Child__c 

Thank You