You need to sign in to do that
Don't have an account?
Keith McRae
Test class using Test.loadData to load profile records
I am trying to create a test class that loads Profile records from a static resource:
@isTest(SeeAllData=false)
public class BatchScheduleOnUserTest {
static testmethod void test() {
List<sObject> profilesList = Test.loadData(Profile.sObjectType, 'BatchScheduleOnUserTestDataProfiles');
}
}
This results in an error:
--- START ---
System.NoAccessException: Insufficient Privileges: You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
--- END ---
Am I able to load Profile records in this manner?
Keith
@isTest(SeeAllData=false)
public class BatchScheduleOnUserTest {
static testmethod void test() {
List<sObject> profilesList = Test.loadData(Profile.sObjectType, 'BatchScheduleOnUserTestDataProfiles');
}
}
This results in an error:
--- START ---
System.NoAccessException: Insufficient Privileges: You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
--- END ---
Am I able to load Profile records in this manner?
Keith