function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi Amol,
Please try this trigger before update and before insert on Opportunity :
public static void addDiscount(List<Opportunity> newOppList){ try{ for(Opportunity eachOpp : newOppList){ eachOpp.Amount = eachOpp.Amount - eachOpp.Amount * (0.1); } upsert newOppList; }catch(Exception e){ System.debug('Error at line number '+e.getLineNumber()+'. '+e.getMessage()); } }
Let me know if it solves your issue and mark it as the best answer.
Thanks.
Hi Amol,
Please try this trigger before update and before insert on Opportunity :
public static void addDiscount(List<Opportunity> newOppList){
try{
for(Opportunity eachOpp : newOppList){
eachOpp.Amount = eachOpp.Amount - eachOpp.Amount * (0.1);
}
upsert newOppList;
}catch(Exception e){
System.debug('Error at line number '+e.getLineNumber()+'. '+e.getMessage());
}
}
Let me know if it solves your issue and mark it as the best answer.
Thanks.