Activity Forums Salesforce® Discussions How to write test class for a class containing reports and dashboards in Salesforce?

  • PRANAV

    Member
    September 16, 2016 at 7:20 am

    Hi Tanu,

    You can write your test class as you normally did however this is one of the few places were you have to use the seeAllData=true annotation. IsTest(SeeAllData=true) to open up data access to records in your organization. I will advise that you use this sparingly and make sure that your tests only rely on the data in those reports and not any other objects in your environment.

    Hope this helps you.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos