public with sharing class HospitalPriceTriggerHandler extends Oly_TriggerHandler{ private Map newMap; private List newList; public HospitalPriceTriggerHandler() { this.newMap = (Map) Trigger.newMap; this.newList = (List) Trigger.new; } protected override void beforeInsert() { setAph(); //setUpProduct(); } //beforeinsert的时候设置医院特价关系表中 经销商医院产品字段的值 public void setAph() { if (Trigger.isInsert) { for (hospitalprice__c hpc : newList) { String a = hpc.hospital__c; String p = hpc.account__c; String h = hpc.product__c; hpc.aph__c = a + p + h; } } } }