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

    Pump Up Your Revenue: Retain Customers With Salesforce!

    Blog in Others

    Advancement in technology has led to fierce competition. Customer retention has become one of the major headaches in the industry. Teams slog to draw traffic to the…

    CRM, Customer Aquisition, Customer Relationship Management, Marketing Automation, Marketing Cloud
    Algoworks Dec 6, 2019
    3,359  Views

    Everything you need to know about Salesforce CRM

    Blog in Salesforce Cloud Platform

    Even to this day, certain marketers have the main question that is spinning in their minds being “What is salesforce, precisely?”. Sure, you’ve definitely seen…

    Commerce Cloud, Data Analysis, Digital Analytics, Sales Cloud, Salesforce
    Jennie Trotter Sep 23, 2019
    2,949  Views
    An Introduction to Screen Flow in Salesforce in 2023

    An Introduction to Screen Flow in Salesforce in 2023

    Blog in Salesforce

    Screen flows are those in which there is user interaction and the user sees a user interface (UI) where they can either enter data or…

    AppExchange, Autolaunched Flow, Business Process, Call Script, CheckBox
    Mayank Apr 25, 2023
    1,564  Views

    Popular Salesforce Videos

    What is Salesforce Apex Trigger | When to use Salesforce Apex Trigger | Type of Salesforce Apex Trigger

    What is Salesforce Apex Trigger | When to use Salesforce Apex Trigger | Type of Salesforce Apex Trigger

    Video in Others

    In this video, we are going to learn some basic concepts of Apex trigger. Below is the Agenda. Video Resource: SFDC Panther

    Salesforce Apex, Apex, Salesforce Apex Trigger, SFDC, Salesforce Basics
    Pooja Nov 1, 2019
    1,834  Views
    A day at Dreamforce Event!

    A day at Dreamforce Event!

    Video in Others

    Time to share with you all the Algoworks Experience at Dreamforce 2019. The fun at Dreamforce was unparalleled, come relish the Dreamforce week with us!…

    salesforce, Salesforce Events, Dreamforce 2019, Dreamforce 19
    Algoworks Nov 28, 2019
    1,597  Views
    Custom Settings and Custom Metadata Explained | 3-Minute | Salesforce Tutorial

    Custom Settings and Custom Metadata Explained | 3-Minute | Salesforce Tutorial

    Video in Salesforce Development

    In this video, Alex walks you through Custom Settings and Custom Metadata types in Salesforce and the difference between them. Discover how ENWAY can assist…

    Apex, Custom Settings in Salesforce, Metadata, Custom Setting, Custom Metadata Types
    ENWAY Nov 24, 2023
    877  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.