Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • 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
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • 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
    • Marketplace
    • Advertise With Us
    • 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 6 years, 7 months ago by  Deepak.
      • This discussion was modified 6 years, 7 months ago by  Deepak.
      Hariom Chaudhary replied 6 years, 7 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

    application solution

    Popular Salesforce Blogs

    No Code Salesforce and WhatsApp Integration

    Blog in Salesforce integration

    Businesses are increasingly using messaging as their primary channel for customer communication. Each week, more than a billion users connect with a business account using…

    APIs, Authorization, Business Account, Business Boost, Buyer Journey
    Apphienz Apr 28, 2023
    1,541  Views
    Become an Advanced Salesforce Administrator - Exam Notes

    Become an Advanced Salesforce Administrator [Exam Notes]

    Blog in Others

    Have you ever doubted your skills of becoming an Advanced Salesforce Administrator? Most of us would have walked down that road, I’m sure. Whilst, some…

    Certified Administrator, MCQ, Salesforce Admin, Salesforce Administrator, Salesforce Certification
    Guha Jan 31, 2018
    9,878  Views

    What is the Content Security Policy (CSP) in Salesforce in 2023?

    Blog in Salesforce

    This is a set of guidelines for securing websites that developers and system administrators may use. Clickjacking, cross-site scripting (XSS), and other code injection attacks…

    ClickJacking, ClickJacking in Salesforce, Content Security Policy, Cross-Site Scripting, CSP Trusted Sites List
    Hexaview Jan 10, 2023
    4,850  Views

    Popular Salesforce Videos

    How Trailhead Military can Help You to Get a Job? | The Shrey Sharma Show | Salesforce

    How Trailhead Military can Help You to Get a Job? | The Shrey Sharma Show | Salesforce

    Video in Salesforce Training

    Shrey is a Chief Executive Officer at Cyntexa, a SILVER Salesforce Consulting Partner in the USA, UK, UAE, Australia, Singapore & India, having a vibrant…

    Salesforce Training, Salesforce Tutorial, Salesforce Certification, salesforce, Salesforce Trailhead
    S2 Nov 23, 2021
    2,194  Views

    Salesforce Quickbooks Integration | eShopSync for Quickbooks

    Video in Salesforce Integration

    Product Sync? Invoice Sync? And more? eShopSync for Quickbooks brings out the best-class solution for Salesforce Quickbooks Integration. Click on the link to know more:…

    Salesforce Integration, salesforce, Salesforce Quickbooks Integration, Salesforce Video, Salesforce Learning
    Deepika Jul 23, 2020
    2,120  Views
    Interested to Learn Salesforce? But Unsure Where to Start?

    Interested to Learn Salesforce? But Unsure Where to Start?

    Video in Salesforce Training

    Salesforce is a popular CRM tool for support, sales, and marketing teams worldwide. Salesforce services allow businesses to use cloud technology to better connect with…

    Salesforce Training, Salesforce Tutorial, salesforce services, Learn Salesforce, Salesforce Video
    Vivek Apr 25, 2022
    2,086  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®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.