Questions tagged [test.loaddata]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

Test.loadData is not inserting data for Producer object

I am working on a Data Factory test class and I was able to successfully load relational data for Account, Case, WorkOrder, User, InsurancePolicy and couple of other custom objects by providing Id in ...
0
votes
0answers
142 views

RecordType using Test.loadData in Testclass for account object

I am trying to export data in csv from one sandbox and trying to load the same data into Test class using loadData method. Currently , I am struggling in creating RecordType within Test class For ...
0
votes
3answers
172 views

Assign random unique numbers to thousands of records

We have a custom object that once it's saved with a checkbox == true, it has to assign a unique random number to each of its children Cases, but the assigned number can't be either zero nor greater ...
5
votes
2answers
871 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
2k 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: ...