• sf training 36
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am new to webservice topics. Can someone give me a detail explain on the Http Resquest/Response vs Rest Resquest/Response vs Soap Resquest/Response.Please
Thanks in advance
public class LPT_InterestAccrued_TriggerHandler {

    public static void updateIAonLoan(List<loan__Loan_Payment_Transaction__c> lptNewData){
        List<loan__Loan_Account__c> loanList = new List<loan__Loan_Account__c>();
        List<loan__Loan_Payment_Transaction__c> lptList = [select id, loan__Cleared__c,
                                                           loan__Loan_Account__r.loan__Loan_Status__c, 
                                                           loan__Loan_Account__r.loan__Interest_Accrued_Not_Due__c
                                                           from loan__Loan_Payment_Transaction__c where id in:lptNewData];
                                                           
                System.debug('Loan payment trsansactions list:====='+lptList);                                         
        for(loan__Loan_Payment_Transaction__c lpt: lptList){
            System.debug('Loan payment trsansactions list:====='+lpt);  
               

               if(lpt.loan__Loan_Account__r.loan__Loan_Status__c=='Closed- Written Off')
               {
                    loan__Loan_Account__c l = new loan__Loan_Account__c();
                    
                    l.id = lpt.loan__Loan_Account__c;
                    
                    System.debug('Loans:====='+l);  
                    if(lpt.loan__Loan_Account__r.loan__Interest_Accrued_Not_Due__c!=0){
                        l.loan__Interest_Accrued_Not_Due__c=0;
                        loanList.add(l);
                    System.debug('Loans list:====='+loanList);  
                    }            
                }
                
                
            } 
            
        
        try{
            update loanList;
        }
        Catch(Exception e){
            System.debug('Exception Occurred:'+e);
        }
    }
}
public class LPT_InterestAccrued_TriggerHandler {

    public static void updateIAonLoan(List<loan__Loan_Payment_Transaction__c> lptNewData){
        List<loan__Loan_Account__c> loanList = new List<loan__Loan_Account__c>();
        List<loan__Loan_Payment_Transaction__c> lptList = [select id, loan__Cleared__c,
                                                           loan__Loan_Account__r.loan__Loan_Status__c, 
                                                           loan__Loan_Account__r.loan__Interest_Accrued_Not_Due__c
                                                           from loan__Loan_Payment_Transaction__c where id in:lptNewData];
                                                           
                System.debug('Loan payment trsansactions list:====='+lptList);                                         
        for(loan__Loan_Payment_Transaction__c lpt: lptList){
            System.debug('Loan payment trsansactions list:====='+lpt);  
               

               if(lpt.loan__Loan_Account__r.loan__Loan_Status__c=='Closed- Written Off')
               {
                    loan__Loan_Account__c l = new loan__Loan_Account__c();
                    
                    l.id = lpt.loan__Loan_Account__c;
                    
                    System.debug('Loans:====='+l);  
                    if(lpt.loan__Loan_Account__r.loan__Interest_Accrued_Not_Due__c!=0){
                        l.loan__Interest_Accrued_Not_Due__c=0;
                        loanList.add(l);
                    System.debug('Loans list:====='+loanList);  
                    }            
                }
                
                
            } 
            
        
        try{
            update loanList;
        }
        Catch(Exception e){
            System.debug('Exception Occurred:'+e);
        }
    }
}