You need to sign in to do that
Don't have an account?
Arun K
Problem in Recursive trigger
below is my trigger where I am trying to update the value in field But couldnt update because of recursive trigger.
what needs to be done to update the value
trigger UpdateCallsByOtherTerritories on String__c(after update) { for( String__c doc:trigger.new){ List<Account> AccountList = [Select Total_Calls_Formula__c,called_by_other__c , OwnerId, Co_Owner__c, Name from Account where name = :doc.Account__r.name]; List<Account> listOfUpdatedAccounts = new List<Account>(); for (account indexAccount:AccountList) { if (indexAccount.OwnerId == userinfo.getuserid()) { } else { indexAccount.called_by_other__c = indexAccount.called_by_other__c + (doc.Updated_CallString__c - Trigger.oldMap.get(doc.Id).Updated_CallString__c); }}
You are trying to update Account object indexAccount I gues. IS there other triggers on Account which is getting called?
Or need to know purpose and problem exactly. It will help others to answer if you supply that.
I need to execute this trigger after update.
http://www.salesforce.com/docs/developer/cookbook/Content/apex_controlling_recursive_triggers.htm
I hope then that your trigger code is best for requirement. Try this:
and class used in this trigger to control recursive call:
Let me know if it helps
Thanks for that.
May be I am close to achieve the updation.
So basically My req is I have string object where I have to update and I should replicate the changes in Account called by other field.
That updation is not happening