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 ago by  Deepak.
      • This discussion was modified 7 years ago by  Deepak.
      Hariom Chaudhary replied 7 years 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 customization

    How Salesforce Customization Services Can Help Your Business

    Blog in Salesforce

    Salesforce is known to have thousands of features used by businesses, along with customization options. Off-the-shelf Salesforce solutions might initially help a business but, moving…

    API, Automation Ttools, Bulk Data, Bulk Data Processing, Business
    360 Degree Aug 3, 2021
    1,907  Views
    salesforce einstein

    Salesforce Einstein – CRM Stepping Into The World Of AI

    Blog in Salesforce Einstein

    We belong to a hyper-connected world these days where each and every step we take is an onslaught of data. So for this world what…

    Artificial Intelligence, CRM, CRM Data, data, Data Analysis
    Algoworks Jun 14, 2017
    7,772  Views

    Salesforce Data Cleansing Guide

    Blog in Data

    The Salesforce data cleansing process involves identifying, correcting, and maintaining accurate and consistent data within the Salesforce platform. Data cleansing is essential to ensure the…

    Data Classification, Data Validation, Multiple Workflows, Salesforce Consulting, Salesforce Data
    Kizzy Consulting Nov 15, 2023
    1,085  Views

    Popular Salesforce Videos

    Salesforce Heroku Integration | Heroku Connect

    Salesforce Heroku Integration | Heroku Connect

    Video in Salesforce Integration

    Heroku is a cloud platform that lets deploy, run and manage applications and websites. It is part of Salesforce Platform. This video will explain about…

    Salesforce Training, Salesforce Tutorial, salesforce platform, Salesforce Video, Salesforce Learning
    Jogender Jul 26, 2021
    4,925  Views
    Prepopulate Field values in Salesforce Lightning Experience Using defaultFieldValues

    Prepopulate Field values in Salesforce Lightning Experience Using defaultFieldValues

    Video in Lightning

    Prepopulate Field values in Lightning Experience Using defaultFieldValues - Spring 20 This video demonstrates the following items: Set Record Type Id Using defaultFieldValues Enforce User…

    Salesforce Training, Salesforce Tutorial, Salesforce Lightning, salesforce, Field Values
    Abhishek Jun 2, 2021
    1,844  Views
    Level Up Your Processes With Google API and Salesforce Integration

    Level Up Your Processes With Google API and Salesforce Integration

    Video in Salesforce Integration

    Complex processes often span multiple systems. In this session, we'll cover how to integrate Google APIs into your Salesforce org with an API library in…

    Salesforce Apex, Salesforce Sales Cloud, Salesforce Integration, Apex APIs, Sales Cloud Consultant
    Nauman Mar 7, 2018
    2,064  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.