• santhosh kumar 15
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
what is the junction object in standard salesforce objects
trigger trans on transaction__c (after insert) {
    
    list<customer__c> lt =new list<customer__c>();
    
        for(transaction__c tr:trigger.new){
           
          customer__c cu = [select id,name from customer__c where id=:tr.customer__cid];
    
        if(tr.type=='deposite')
            cu.balance__c=cu.balance__c+tr.amount__c;
        else if(tr.type=='withdraw'){
            cu.balance__c=cu.balance__c-tr.amount__c;
        }
    }
}