public with sharing class QuoteLineItemTriggerHandler { //XHL-20190513-AddStart public static void SetOpportunityLineItem(List newList, Map newMap, List oldList, Map oldMap){ String singleProduct = System.Label.SingleProduct; List quoteLineItemList = new List(); //当在询价页面添加询价行项目时,生成报价行项目对应字段的赋值 for (QuoteLineItem qli : newList) { if (qli.SingleProduct__c) { QuoteLineItem quoteLineItem = new QuoteLineItem(); quoteLineItem.Id = qli.Id; quoteLineItem.Set__c = singleProduct; quoteLineItemList.add(quoteLineItem); } } if (quoteLineItemList.size() > 0) { update quoteLineItemList; } } //XHL-20190513-AddEnd }