Questions tagged [test-data]
The test-data tag has no usage guidance.
How to handle namespace for Test.loadData method
I am trying to insert test data with Test.loadData for custom object with fields in my managed package. The problem is my developer org do not have a namespace and packaging org has it. How we can ...
Test Data - Static Resources
I have many custom objects with lots of relationships and i want to create some test data for my test classes. For example, i have the Objects Account Opportunity Basket Product Configuration Product ...
Is it possible to use another name for the TestDataFactory class
I have followed the trailheads for making a TestDataFactory. In the documentation it states that the TestDataFactory is a special class used for testdata. What isn't clear to me is can I change the ...
Updating Object during isUpdate and isBefore trigger
I have a trigger that fires on the event trigger.isUpdate && trigger.isBefore for the Account object. In this trigger, I need to update a field in the Account object. I tried to add an update ...
Is there a way to insert data with specific IDs?
I'm not sure if I'm explaining this correctly but I'll give it a shot. I'm trying to use Data Loader to insert CSVs of data into a Partial Pro sandbox, but I want these inserted records to use the ...
Test Failed 'Validation Errors While Saving Record(s)' when loading Accounts with Test.LoadData
Background When I use the Test.LoadData method to load Account records: List<Account> accountList = (List<Account>) Test.loadData(Account.sObjectType, 'account_test_data'); I get this ...
Error System.SObjectException: Business Account may not use Person Account field PersonHomePhone when loading Person Accounts using Test.LoadData
I get this error message: System.SObjectException: Business Account may not use Person Account field PersonHomePhone When I try and load Person Accounts using Test.LoadData() below is the data: ...