You need to sign in to do that
Don't have an account?
Keri-An Richards 9
Update account on contract activation
Hi all,
Wondering if you can help please... I need to update a custom field "Contract_end_date__c" on my Account record when a Contract is Activated.
Although it seems this -should- be able to be done either by adding a formula field, roll-up summary field or a workflow - it doesn't seem that the Account/Contract Master/Detail relationship works in the same way that many of the others do and therefore there doesn't seem to be a way to do this without code.
I'm not a developer, and would really appreciate any help I can get.
Thanks,
Keri-An
Wondering if you can help please... I need to update a custom field "Contract_end_date__c" on my Account record when a Contract is Activated.
Although it seems this -should- be able to be done either by adding a formula field, roll-up summary field or a workflow - it doesn't seem that the Account/Contract Master/Detail relationship works in the same way that many of the others do and therefore there doesn't seem to be a way to do this without code.
I'm not a developer, and would really appreciate any help I can get.
Thanks,
Keri-An
Check This Trigger
Regards
Gopal Rathore
All Answers
Check This Trigger
Regards
Gopal Rathore
trigger UpdateAccountIfContractActivated on Contract (after update) {
for(contract con : trigger.new){
if(con.status == 'Activated'){
account ac = [SELECT id , Contract_Renewal_Date__c from account where id =:con.AccountId];
ac.Contract_Renewal_Date__c = con.EndDate;
update ac;
}
}
}