我在看起来不再存在的对象上遇到错误。尝试将不相关的Apex触发器部署到生产环境时,由于此错误,它不会让我失望。有人看过吗?您有什么建议吗?
码
public with sharing class KnowledgeArticleViewerController {
public KnowledgeArticleVersion article {get; set;}
private Id articleId;
public KnowledgeArticleViewerController(ApexPages.standardController stdController) {
articleId = ApexPages.currentPage().getParameters().get('id');
List<KnowledgeArticleVersion> articles = [SELECT Id,Title FROM KnowledgeArticleVersion WHERE PublishStatus = 'Online'];
ApexPages.addMessage( new ApexPages.Message(ApexPages.Severity.ERROR, 'Got article ids: ' + articles.get(0).Id
+ ' ' + articles.get(1).Id + ' ' + articles.get(2).Id) );
article = articles.get(0);
}
}
结束码
Error: Compile Error: sObject type 'KnowledgeArticleVersion' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. at line 8 column 44
没有
KnowledgeArticleVersion
对象,并且在我到达这里之前2年以上实现了此代码。
最佳答案
每当您将任何代码更改部署到Salesforce的生产实例时,都会重新编译该实例的所有代码并运行所有测试。
您将必须通过删除对不存在的sObject(KnowledgeArticleVersion)的引用来修复此代码,然后才可以部署其他更改。
关于class - 错误: Compile Error: sObject type 'KnowledgeArticleVersion' is not supported.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17415376/