You need to sign in to do that
Don't have an account?
Siddharth Lakhotia
Trigger to summarize value of a field?
Hi,
I have 2 objects Object A and Object B
Object B has a lookup to object A.
Object A has three fields Aname , BNmber and ASales
Bnumber is a code and can have several values against it.
Bnumber 123 ASales 100
Bnumber 123 ASales 300
Bnumber 123 ASales 500
I need help in writting trigger on object B, that pulls sum of Asales against Bnumber ( 900 against 123 in this case)
The sum of Asales against Bnumber should be stored in a field on Object B...
Post that I can rollup this object to Opportunity(master) and then the actual sales will appear on the opportunity
I have 2 objects Object A and Object B
Object B has a lookup to object A.
Object A has three fields Aname , BNmber and ASales
Bnumber is a code and can have several values against it.
Bnumber 123 ASales 100
Bnumber 123 ASales 300
Bnumber 123 ASales 500
I need help in writting trigger on object B, that pulls sum of Asales against Bnumber ( 900 against 123 in this case)
The sum of Asales against Bnumber should be stored in a field on Object B...
Post that I can rollup this object to Opportunity(master) and then the actual sales will appear on the opportunity
As per your requirement you want sum of Object A Sales on Object B.
for this you can create a rollup field on Object B on Object A Sales.