You need to sign in to do that
Don't have an account?
phantom1982
Help on trigger to create the total of transactions
Hi
I have two objects here
1)Transactions
2)Achieved
I have a field on Transactions named Amount
and a field on Achieved name Total Value
If a user does 7 transactions in a financial year , I want the total of the 7 transaction object Amount field to add up to the Total Value field on Achieved object.
If the user deletes the transaction, the Total value field should be deducted also.
Financial year is 1 Jan 2012 - 31 DEC 2012. The transaction should be decided based on the created date.
Please help me on this
Thanks
Hello Smit,
Trigger will be on Transactions object after insert and after update. In the actual trigger coding . You need to create a Map<Achieved,List<Transactions>>
and then you need to process tha each and every tarnsaction. This is the core logic.
If you have actual code there you can post :)
Thanks
Nik
What the relation between the Transction Object and Achieved Object ....
Hi SFDC_Evolve,
I have a look up relationship between the Transaction and Achieved object.
Unfortunately I cannot create a Master - Detail relationship as the Transaction object is a managed object.
Can you please help me with the trigger.
Thanks and KR
Hey Phantom,
The below code should help.
I have used Account Object as the Object on which the value needs to be rolled up.
Transactions__c is the child object and Account__c is a lookup to the Account Object,
Let me know if this helps.
thanks and regards ]\
priya