I have a requirement where i am creating child records when lead is getting created.
On Lead conversion those records are getting attached to opportunity as child records
I have trigger to be fired on those child records after those are attached to the opportunity on lead conversion
I know triggers wont fire on cascade update.But i require an alternate solution for updating the count of child records on opportunity
Attribution to: user6833
Possible Suggestion/Solution #1
One solution is to create a rollup summary field in the parent object which is in your case is Opportunity. But the child objects to opportunity should be master-detail.
Attribution to: Bforce
Possible Suggestion/Solution #2
You can create a custom field to store the count of related records associated to lead Object.
You can have a custom field on Opportunity and then map that count on lead against opportunity custom field using lead TO Account/Contact/ Opportunity Mapping.
during lead conversion, the count of related records would be mapped to opportunity custom field.
Attribution to: Kaw Sumit
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/33971