You need to sign in to do that
Don't have an account?
lohith m
Hi All I have a scenario here plese help me i am learner in salesforce please help me with this topic .... thanks in advance......
Create a Custom Formula Field Age in Contact (value needs to be calculated in Years Based on Date of Birth)
Then in account create 4 fields Below 18, 18-30,31-59,60+ (Number Type)
Then create a Trigger and rollup the counts accordingly from Contact to Account.
For example
if there are 20 people under 18 then In Account Below 18 should show 20.
if there are 50 people under 18 -30 then In Account 18-30 should show 50…..
rollup trigger
Hi All I have a scenario here plese help me i am learner in salesforce please help me with this topic .... thanks in advance......
Create a Custom Formula Field Age in Contact (value needs to be calculated in Years Based on Date of Birth)
Then in account create 4 fields Below 18, 18-30,31-59,60+ (Number Type)
Then create a Trigger and rollup the counts accordingly from Contact to Account.
For example
if there are 20 people under 18 then In Account Below 18 should show 20.
if there are 50 people under 18 -30 then In Account 18-30 should show 50…..
All Answers
I would start there, as this is a pretty straight forward trigger to write.
However, if you're looking for a easier approach, you might want to look at installing the "Declaritive Rollup Summary Tool" which can create rollup summary functionality even for lookup relationships. It also supports filtering criteria for your Contact DoB criteria. For more on the tool see here: http://andyinthecloud.com/2014/02/09/new-release-spring14-declarative-rollup-summary-tool/