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

    How to Integrate HubSpot With Salesforce CRM: Three Options

    Blog in Salesforce integration

    The goal of every business is to drive sales. However, its success is determined by the synergy of all departments, especially marketing and sales. 52.2%…

    API, Azure, Business Needs, Complexity, Consult
    Twistellar Jul 20, 2023
    1,254  Views

    Salesforce Shield: Features, Benefits, and Implementation

    Blog in Salesforce

    Salesforce Shield, a component of Salesforce Platform, is a security solution that secures your company with point-and-click capabilities to improve transparency, governance, trust, and compliance…

    API Access, App Usage, AppExchange Apps, Applications, Attachments
    SP Jun 21, 2023
    2,867  Views
    Production Environment in Salesforce

    Deployment on Production Environment in Salesforce

    Blog in Salesforce Tools

    When we move any code or component into a production environment we need to keep the below terms for our understanding: These terms are-: Change…

    Apex Test Class, Aura Components, Automation Testing, Change Set, Change Set Components
    SF Feb 16, 2022
    5,380  Views

    Popular Salesforce Videos

    GS DevOps Mate: Your Free Flexible Toolkit for Faster and Smoother Salesforce Deployments

    GS DevOps Mate: Your Free Flexible Toolkit for Faster and Smoother Salesforce Deployments

    Video in Salesforce DX

    Are you considering automated Salesforce deployments based on repos? Or are you struggling with setting up CI/CD utilizing SFDX on the CI/CD platform of your…

    Salesforce Developers, DevOps, Javascript, Google, Webinar
    Groundswell Cloud Nov 23, 2020
    3,844  Views
    What are lookup filters in Salesforce?

    What are lookup filters in Salesforce?

    Video in Salesforce Implementation

    In this video, we will leaarn about Lookup Filters in Salesforce by dividing this topic into 4 basic points, which are: 1. What is a…

    Salesforce Records, Salesforce Lightning, Salesforce Implementation, Salesforce Data Management, Salesforce Objects
    Jogender Apr 5, 2018
    3,236  Views
    Salesforce Rest API | Http Methods | Salesforce Integration

    Salesforce Rest API | Http Methods | Salesforce Integration

    Video in Salesforce Integration

    This video we will discuss - What is API Different API In Salesforce Rest API in Salesforce HTTP Request HTTP methods Workbench to make HTTP…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, Salesforce Rest API, salesforce
    kanika Jan 10, 2022
    2,827  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.