【发布时间】:2015-06-29 07:36:58
【问题描述】:
我编辑了我的课程并成功保存,但是当我访问使用该课程的页面时,我收到一个错误
目前不允许使用 DML 发生意外的错误。您的开发组织已收到通知。
这是我的控制器
public class DefinitionController {
public DefinitionController() {
this.DefTable();
}
public void DefTable() {
listplatforms = [select Name, Status__c from Platform__c];
for (Platform__c idlistplatforms : [select Id from Platform__c]) {
List<Def__c> existplatforms = [select Platform__c from Def__c where Platform__c = :idlistplatforms.Id];
if (existplatforms.size() > 0) {
idlistplatforms.Status__c = 'Set';
//update idlistplatforms;
System.debug('Found' + idlistplatforms);
} else {
idlistplatforms.Status__c = 'Not Set';
//update idlistplatforms;
System.debug('Not Found' + idlistplatforms);
}
update idlistplatforms;
}
}
}
我认为问题出在 update 部分。有人可以编辑我的代码以便我克服这个错误吗?
提前致谢!
【问题讨论】:
标签: salesforce apex-code apex force.com dml