0

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

  • i can provide additional steps to create rollup summary if you want. – Bforce Apr 29 '14 at 14:19
  • the created on lead object when is it converted i.e and update action is performed on lead and it give the converted opportunity which has to be updated. – user6833 May 12 '14 at 9:04
  • What do you mean you know the triggers wont fire on cascade update? It sounds like you're saying records are being created on a child object and the trigger isn't firing. – Phil B May 12 '14 at 13:57
1

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.

| improve this answer | |
0

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.

| improve this answer | |
  • we have look up relation and that cannot be changed to masterdetail – user6833 May 1 '14 at 4:53
  • we are updating the values in parent object using trigger – user6833 May 1 '14 at 4:54
  • rollup summary field is the easiest way and since its has been already setup as look up relationship the trigger is the second option. – Bforce May 1 '14 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.