You need to sign in to do that
Don't have an account?
sankum
Trigger Help
hi have one scenario
one field has one value (ex:f1=15)
if i upadated that field that field it will replace to f1=50;
i tried a code but i got some exception what is the code for that?
Hi ,
Try below :
Trigger updateValue on Account(before insert,before update){
for(Account acc : Trigger.new){
if(acc.f1__c==15){ //f1__c is the field where value needs to be replaced
acc.f1__c = 50;
}
}
All Answers
Hi kirasan
Please can you post exception?
Hi ,
Try below :
Trigger updateValue on Account(before insert,before update){
for(Account acc : Trigger.new){
if(acc.f1__c==15){ //f1__c is the field where value needs to be replaced
acc.f1__c = 50;
}
}