Li Jun
2022-04-06 fb04e7c01d119c60632b4298d18fd93f3ccb3d79
force-app/main/default/triggers/AccountTrigger.trigger
@@ -131,26 +131,27 @@
        }
        //HWAG-B4PCZ5 2018-09-19 end 
        //NFM112 2021/11/10 start
        String Idbox;
        List<String> IdList = new List<String>();
        for(Account account : Trigger.new){
           Account old = Trigger.oldMap.get(account.Id);
           if(old.FirstParagraph__c != account.FirstParagraph__c  || old.MonthlyPayment__c != account.MonthlyPayment__c){
                    Idbox = account.Id;
                IdList.add(account.Id);
            }
        }
        if(Idbox != null){
            BatchIF_Log__c iflog = new BatchIF_Log__c();
            iflog.Type__c = 'NFM112';
            iflog.Log__c  = 'callout start\n';
            insert iflog;
            iflog = [Select Id, Name from BatchIF_Log__c where Id = :iflog.Id];
            System.debug(Logginglevel.DEBUG, 'NFM112_' + iflog.Name + ' start');
            NFM112Controller.executeNotFuture(iflog.Id, Idbox);
        if(IdList.size()>0){
            for(String Id : IdList){
                BatchIF_Log__c iflog = new BatchIF_Log__c();
                iflog.Type__c = 'NFM112';
                iflog.Log__c  = 'callout start\n';
                insert iflog;
                //iflog = [Select Id, Name from BatchIF_Log__c where Id = :iflog.Id];
                //System.debug(Logginglevel.DEBUG, 'NFM112_' + iflog.Name + ' start');
                NFM112Controller.executeNotFuture(iflog.Id, Id);
            }
        }
        //NFM112 2021/11/10 end
    }
    //add            wangweipeng              2022/02/10                            start
 //add            wangweipeng              2022/02/10                            start
    //经销商的性质发生变化,那么需要发邮件,其中一个收件人为大区助理
    //大区助理:根据此经销商所在的那个大区,来判断到底发给谁,每个大区助理都有一个人,目前是存到自定义源数据里面了
    if(Trigger.isBefore){