function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
admintrmpadmintrmp 

Test.loadData() - Can we put the CSV files into a zip file?

We like to be very organized with our work and having tons of static resources is very messy in my opinion.

 

Is it possible to still use Test.loadData() using a CSV file that's been placed in a zip file? Like you can with CSS and Javascript files when calling them from Visualforce.

 

I tried to do the following but it didn't work:

 

Test.loadData(Contact.sObjectType, 'testdata/contacts');

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

No.  The docs state that the static resource must be a CSV file.  There's no support for extracting files from archives I'm afraid.

All Answers

bob_buzzardbob_buzzard

No.  The docs state that the static resource must be a CSV file.  There's no support for extracting files from archives I'm afraid.

This was selected as the best answer
admintrmpadmintrmp

Ah, hopefully one for the future then! Thanks for the info.

 

To the IdeaExchange! :-)