Questions tagged [test-data]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
143 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
1answer
26 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
1answer
63 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
1answer
971 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 ...
5
votes
1answer
682 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
1answer
1k 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: ...