You need to sign in to do that
Don't have an account?

trigger scenario
Hi All,
Q). One object (s1) & 3 tasks (t1, t2, t3) are there. Each task performing discount related stuff.
Write a trigger that should calculate the sum of 3 tasks. And if any task is modified than trigger should fire automatically & perform the same.
Can any one reply for this post..
Thanks in advance
Q). One object (s1) & 3 tasks (t1, t2, t3) are there. Each task performing discount related stuff.
Write a trigger that should calculate the sum of 3 tasks. And if any task is modified than trigger should fire automatically & perform the same.
Can any one reply for this post..
Thanks in advance
Are u craeted field of discount .
Regards,
Harish.R
1) http://amitsalesforce.blogspot.com/2016/09/collection-in-salesforce-example-using.html
Please check below post for rollup field by trigger
1) http://blog.jeffdouglas.com/2009/07/30/roll-up-summary-fields-with-lookup-relationships-part-1/
2) https://github.com/abhinavguptas/Salesforce-Lookup-Rollup-Summaries
Just modify your trigger wil above post. If you found any error please post your code here we will help you
You need to create a Trigger on Task which will be on After Insert & Update.
Then if insert just simply sum the all taks discount and Update on Parent Object.
Else if Update check wheather the old and new value are changed. on that basis update the Parent Object.
Please let me know, if you have any other question.
Regards,
Ajay Mishra