在编译以下代码段时,我收到“保存错误:字段表达式的初始项必须是具体的 SObject:字符串”。请让我知道我在这里错过了什么!谢谢
private Attachment validateAttachment(Attachment attachment){
String name = attachment.Name;
String extension = name.substring(name.lastIndexOf('.'), name.length);
if(acceptedExtension.contains(extension)){
return attachment;
}else{
throw new Exceptions.AppException();
}
}