+ Start a Discussion
Neeraj Sharma 103Neeraj Sharma 103 

Hi Everyone I have three Custom Objects CustomObjA , CustomObjB, CustomObjc Now i wan to do roll up

Hi Everyone I have three Custom Objects 
CustomObj A
Custom Obj B
Custom Obj C

CustomObj A is the lookup on Custom Obj B and Custom Obj C 
But Custom Obj B and Custom Obj C in between there is no relation between us Now My Requirement is there is a Number fields on Custom Obj B and Custom Obj C  I want to SumUp of both these fields and Populate on CustomObj A So How to achieve this requirement Please tell me
Pallavi KavarePallavi Kavare
Hi Neeraj,

You can create Formula field on Custon Object - CustomObj A where you can provide formula to add Number fields from Object B and Object C. PFB, the formula for reference.
NumberofObjB__r.Count__c  +  ObjC__r.QuantityC__c
NumberofObjB__r.Count__c - This is Number on Object B
ObjC__r.QuantityC__c - This is Number field on  Object C.

Thanks,
Pallavi
Neeraj Sharma 103Neeraj Sharma 103
Hi Pallavi Kavare
Thanks For Reply Can we Write Trigger For this Requirement
Neeraj Sharma 103Neeraj Sharma 103
Actually i dont want to use Formula field that why
 
Pallavi KavarePallavi Kavare
Yes you can write trigger to update field on Object A when record is inserted for Object B and Object C or updated
Rohit KumawatRohit Kumawat
Hi @Neeraj Sharma 103,
You have to write trigger for insert and update on Custom object A

In whice you can fetch the number field value of custom object B and C using SOQL.

and than you can add both number field value and assing that value to number field of Custom Object A


I hope this above solution will be helpful.