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

    Salesforce Partner

    What Makes Teqfocus Your Perfect Salesforce Partner

    Blog in Salesforce

    When you ask yourself the question of which Salesforce company is the best in India and which company should you consider as the perfect Salesforce…

    End-to-end Support, Organizations, Pricing, Salesforce Certified Partners, salesforce company
    Teqfocus Dec 8, 2022
    2,326  Views

    What is Salesforce Web3 Tech and How Does it help in Creating Reliable, Long-Lasting Communities

    Blog in Salesforce

    With a unified platform and the help of Salesforce Web3, organizations can efficiently scale while creating linked consumer experiences across Web2 and Web3. Web3, referred…

    API interface, audiences, audited, Automate Procedures, Blockchain
    Apphienz Apr 25, 2023
    2,369  Views

    All You Need to Know About Marketing & Commerce Cloud in Salesforce

    Blog in Others

    Marketing & Commerce Cloud in Salesforce Welcome back everyone; since you know about the sales and service cloud you guys must be curious about the…

    Artificial Intelligence, Automation, Behavior, Campaigns, CLOUD
    Mohit Kumar May 10, 2023
    1,926  Views

    Popular Salesforce Videos

    How to Create Your First Salesforce Lightning Component?

    How to Create Your First Salesforce Lightning Component?

    Video in Lightning

    OpFocus walks through the steps you need to know to create your first Salesforce Lightning Component.

    Salesforce Lightning, Salesforce Lightning Experience, Salesforce Lightning Components, Salesforce Lightning Design System, How To Learn Salesforce Lightning
    Shiv Kumar Sharma Jan 31, 2018
    2,647  Views
    How to use Einstein Engagement Scoring in Salesforce Marketing Cloud

    How to use Einstein Engagement Scoring in Salesforce Marketing Cloud

    Video in Marketing, Salesforce Cloud Platform, Salesforce Einstein

    Cameron Robert shows how to gain actionable insights from the Einstein Engagement Scoring Dashboard in Salesforce Marketing Cloud, and talks through a few activity ideas…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Einstein, Salesforce Marketing Cloud
    Cameron Sep 20, 2021
    3,741  Views
    Customer Overview: How Our Customer Used Salesforce Industries i.e Vlocity For It’s Business?

    Customer Overview: How Our Customer Used Salesforce Industries i.e Vlocity For It’s Business?

    Video in Salesforce Training

    Let's have a glance at our customer success story to understand what is Salesforce Industries in detail. Watch this video and do let us know…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Cyntexa Dec 15, 2022
    1,215  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.