Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › Is it possible to query in an apex test class in salesforce?

    Tagged: Account, Salesforce Apex, Salesforce Test Class

    • Salesforce® Discussions

      Is it possible to query in an apex test class in salesforce?

      Posted by Deepak on August 22, 2019 at 12:08 PM

      For a test class I need to use an account data, can I query for an account or I have to insert?

      • This discussion was modified 7 years, 3 months ago by  Deepak.
      • This discussion was modified 7 years, 2 months ago by  Deepak.
      Hariom Chaudhary replied 7 years, 3 months ago 2 Members · 1 Reply
      • Account
      • Salesforce Apex
      • Salesforce Test Class
    • 1 Reply
    • Hariom Chaudhary

      Member
      August 23, 2019 at 5:12 AM

      Hi, Deepak

      Yes,we can query  but for that we need to setup the test data that is being queried in the SOQL.

       

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Introduction to Salesforce: What is Salesforce and Why is it Popular?

    Blog in Salesforce

    What is Salesforce? Imagine having a platform that allows your business to manage everything in one place—customer relationships, sales, marketing, support, and more. That’s Salesforce,…

    Elastik Aug 1, 2025
    506  Views

    4 Top Features of Salesforce Partner Portal To Increase Business Revenue

    Blog in Salesforce

    Salesforce partner portal enables your business partner who isn’t a part of your organization to log in to your Salesforce account easily. It will help…

    Asset Repository, Business Insights, Business Partner, Business Partners, Communication
    CRMJetty Aug 23, 2022
    4,129  Views

    Here's What Slack - Salesforce Integration Have in Store for You

    Blog in Salesforce integration

    Communications, process integration, and connectivity get complicated to handle as the firm or corporation grew. When your staff work remotely, keeping in touch with them…

    Application Architecture, Apps, Brand Awareness, Client Query, Client Support
    Apphienz Aug 18, 2021
    2,816  Views

    Popular Salesforce Videos

    Selling the Idea of Salesforce to Your Company - Make Your Own Experience

    Selling the Idea of Salesforce to Your Company - Make Your Own Experience

    Video in Sales

    Salesforce can be a great asset for companies, but sometimes it can be tough to sell the idea of implementing it to decision-makers. In this…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Learning, Implementing Salesforce
    Rahul kapoor Sep 2, 2022
    2,350  Views
    How Will Salesforce Career Look Like 3 Years From Now?

    How Will Salesforce Career Look Like 3 Years From Now?

    Video in Salesforce Stories

    In this video, Shrey shares his opinions about How will Salesforce career look like 3 years from now. Watch and learn. If you have any…

    Salesforce Training, Salesforce Tutorial, Salesforce Certification, Salesforce Developer, salesforce
    Jogender Feb 25, 2021
    1,574  Views
    Open Facebook Messenger and Send Message using Lightning Component Salesforce | Salesforce Tutorials

    Open Facebook Messenger and Send Message using Lightning Component Salesforce | Salesforce Tutorials

    Video in Salesforce Training, Salesforce Development

    In this video you will learn to open Facebook Messenger and send message to users using their facebook's username. We will create a quick action…

    Salesforce Training, Salesforce Tutorial, Salesforce Development, Salesforce Lightning, salesforce
    Kapil Jul 16, 2020
    2,464  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.