You need to sign in to do that
Don't have an account?

Create Report in Test Class
Hi,
I'm trying to create a sample report to use in the test class. I cannot use the SeeAllData=true because the test class is for a managed package and cannot assume that there is a sample report record available in the user's instance to use when they install it, so I really need to create a new report in the test class.
Is this even possible or a work around for this?
I'm trying to create a sample report to use in the test class. I cannot use the SeeAllData=true because the test class is for a managed package and cannot assume that there is a sample report record available in the user's instance to use when they install it, so I really need to create a new report in the test class.
Is this even possible or a work around for this?
Here is the documentation about creating a report with a couple examples.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_test_reports.htm
OwnerId is a user id not a Folder Id. To look up a report in a folder you need to use the folder name. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_report.htm
just realized that and delete my reply, sorry
but is it possible to retrieve built-in reports?