You need to sign in to do that
Don't have an account?
Snehal Gaware 15
help needed on after update trigger which is not updating field value
Hi I have written a trigger where Case is parent object and SC_Problem_Case_Link__c is child object. this trigger working fine when child object is having any status other than Ready for testing, at that by using this trigger i am bale to change the status as tested.
But when status of child object is 'Ready For testing' i am not able to change it to tested.
is there any suggestion how to resolve this.
But when status of child object is 'Ready For testing' i am not able to change it to tested.
if((Trigger.isAfter && Trigger.isUpdate)) { Set<Id> Ids = new Set<Id>(); List<SC_Problem_Case_Link__c> scprblm = new List<SC_Problem_Case_Link__c>(); for (Case cs: Trigger.new) { Case oldLead = Trigger.oldMap.get(cs.Id); if (cs.Status == 'Tested') { Ids.add(cs.Id); } } for (SC_Problem_Case_Link__c rateSheet: [select Id,Status__c from SC_Problem_Case_Link__c where Case__c in :Ids]) { // List<SC_Problem_Case_Link__c> accts = [Select Id, Status__c from SC_Problem_Case_Link__c where Id in : Trigger.old]; if (rateSheet.Status__c != 'Tested') { rateSheet.Status__c = 'Tested'; scprblm.add(rateSheet); } } if (!scprblm.isEmpty()) { update scprblm; }}
is there any suggestion how to resolve this.