You need to sign in to do that
Don't have an account?
The new Learner
Need to calculate the Opportunity Amount based on the Record type--very urgent
Hi Experts
I need to calculate the Opportunity amount sum based on the Recod type Eg: i have A, B, C three Record types , Now i will create record with the record type B by selecting the parent opportunity Record of Record type A. Now i need to calculate sum of all the records of Record type B which is assicated to the Opportunity Record type of Record type A. simily amount of C record type records on B record type record.
Thanks in advance
I need to calculate the Opportunity amount sum based on the Recod type Eg: i have A, B, C three Record types , Now i will create record with the record type B by selecting the parent opportunity Record of Record type A. Now i need to calculate sum of all the records of Record type B which is assicated to the Opportunity Record type of Record type A. simily amount of C record type records on B record type record.
Thanks in advance
Is your opportunity always created with the right record type e.g. B will always have A as a parent and C will always have B as a parent opportunity?
Rehards,
Kapil
Thanks for the reply i am desperately waiting for the responce, yes it will as you said it will create like that.
In this please find the code below. Hopefully this will work for you.
ChildRecords_Amount__c is a custom field on opportunity of type currency. Parent_Opportunity__c is a lookup on opportunity.
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Regards,
Kapil
(forcecube@gmail.com)
Thanks for the code but i have one doubt , dont we need to consider the Record types here becasuse we need to sum the amount based on record type only
If there is always a certain type of recordtype will insert for child then no need to check this. if Parent A will have B and C both then you have to check this and there will be 2 fields on opportunity 1. For B childTotal and For c ChildTotal.
Regards,
Kapil
COde is working fine i need for the , for the B and C record type as well. Kindly help me out please