Questions tagged [test-data]
The test-data tag has no usage guidance.
7
questions
1
vote
0
answers
64
views
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 ...
1
vote
2
answers
3k
views
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 ...
0
votes
1
answer
96
views
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 ...
1
vote
1
answer
482
views
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 ...
1
vote
1
answer
3k
views
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 ...
6
votes
2
answers
1k
views
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 ...
2
votes
1
answer
3k
views
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:
...