• Amol Pracheta
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

public class ApplyDiscount{

public static void insertdiscount(List<opportunity> opplist){
    for(Opportunity oa: opplist){
      if(oa.IsDiscountApplied__c != True)
     { oa.Amount= oa.Amount - oa.Amount*(0.1);
       oa.IsDiscountApplied__c=True;
      }          
   }
    }
}