Salesforce 具有0%代码覆盖率的sfdc触发器。我需要有1%的内存才能部署触发器
这个触发器正确吗?我无法部署它Salesforce 具有0%代码覆盖率的sfdc触发器。我需要有1%的内存才能部署触发器,salesforce,Salesforce,这个触发器正确吗?我无法部署它 trigger AccountSurveyTrigger on Account_Survey__c (after delete, after insert, after undelete, after update) { List<Account_Survey__c> childObjectList; List<Account_Survey__c> oldChildObjectList;
trigger AccountSurveyTrigger on Account_Survey__c (after delete, after insert, after undelete, after update) {
List<Account_Survey__c> childObjectList;
List<Account_Survey__c> oldChildObjectList;
if( Trigger.isDelete ) {
childObjectList = Trigger.old;
} else {
childObjectList = Trigger.new;
}
//Pass in the name of the child record, in this case 'Contact' and the name of the parent record, in this case 'Account';
LookupRollupHelper lh = new LookupRollupHelper( 'Account_Survey__c', 'Account');
lh.doMathQuery = true;
lh.mathQueryType = 'AVG';
//Convert the Trigger.list to a list of sObjects
if(Trigger.isUpdate) {
lh.rollupSummary((List<sObject>)childObjectList, (List<sObject>)Trigger.old);
} else {
lh.rollupSummary((List<sObject>)childObjectList, null);
}
AccountSurveyHelper.findMostRecentNPS(trigger.new);
System.debug('After finding most recent');
在帐户调查上触发AccountSurveyTrigger(删除后、插入后、取消删除后、更新后){
列表对象列表;
列表oldChildObjectList;
if(Trigger.isDelete){
childObjectList=Trigger.old;
}否则{
childObjectList=Trigger.new;
}
//传入子记录的名称(在本例中为“联系人”)和父记录的名称(在本例中为“帐户”);
LookupullUpulper lh=新的LookupullUpulper('Account_Survey___c','Account');
lh.doMathQuery=true;
lh.mathQueryType='AVG';
//将Trigger.list转换为Sobject列表
if(Trigger.isUpdate){
lh.rollupSummary((List)childObjectList,(List)Trigger.old);
}否则{
lh.rollupSummary((List)childObjectList,null);
}
AccountSurveyHelper.findMostRecentNPS(触发器.新);
System.debug('查找最近的');
您是否收到错误?什么时候?是什么原因?当我尝试部署时,收到的错误是Insert失败。第0行出现第一个异常;第一个错误:未知\u异常,无法保存记录,因为它未能触发流。流触发器无法执行版本ID为3的流01160000DZE.
请与管理员联系以获取帮助:[Class.TestDataGenerator.getContacts:第382行第1列Class.TestDataGenerator.initAllTestData:第1086行第1列Class.TestDataGenerator.TestDataGenerator单元测试:第1112行第1列