apex测试类查不到存量数据

解决方法:为test加上SeeAllData=true注解:

@isTest(SeeAllData=true) 
public class xxx{
}

如果测试类使用了 @isTest(SeeAllData=true) 注解,它将允许测试类访问现有数据。

你可能感兴趣的:(Salesforce,开发语言,apex,salesforce)