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

    Leveraging Salesforce AI to Identify High-value Sales Opportunities

    Leveraging Salesforce AI to Identify High-value Sales Opportunities

    Blog in Sales

    In today's fiercely competitive business landscape, leveraging advanced technologies has become imperative for staying ahead of the curve. Among the plethora of tools available, Salesforce…

    Competitive Advantage, Competitive Landscape, CRM, CRM Solutions, Customer Data
    TechForce May 29, 2024
    851  Views

    Why and how do you migrate to Salesforce Lightning?

    Blog in Lightning

    Why move to Salesforce Lightning right now? Salesforce Lightning is the Salesforce brilliant feature with interactive UI that provides intuitive tools and services to automate…

    Lightning App Builder, Sales Automation, Salesforce, Salesforce Einstein, Salesforce Lightning
    AwsQuality Nov 7, 2019
    3,584  Views

    Maximizing Your ROI with a Skilled Salesforce Developer

    Blog in Salesforce

    Salesforce is the world's leading customer relationship management (CRM) software, which helps businesses of all sizes to manage customer interactions, sales, marketing, and customer service…

    APIs, Best Practices, Business Growth, Business Processes, Collaboration
    CRMJetty Apr 27, 2023
    2,226  Views

    Popular Salesforce Videos

    Set Your Sales Cloud Implementation Up for Success

    Set Your Sales Cloud Implementation Up for Success

    Video in Sales, Salesforce Cloud Platform

    Make Sales Cloud a valued business tool that your sales reps will rely on by starting with these planning strategies and best practices for success.…

    Salesforce Training, Salesforce Video, Sales Cloud, Salesforce Learning, Technology
    Abhishek Apr 14, 2021
    3,601  Views
    How to Build an Email Using Content Builder in Salesforce Marketing Cloud

    How to Build an Email Using Content Builder in Salesforce Marketing Cloud

    Video in Salesforce Training

    Cameron Robert steps through how to build your first email in Salesforce Marketing Cloud using Content Builder by replicating an existing Salesforce email from ReallyGoodEmails.com.…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Marketing Cloud, Salesforce Video
    Cameron Aug 16, 2022
    2,979  Views
    How to Subscribe Salesforce Report in Lightning Experience?

    How to Subscribe Salesforce Report in Lightning Experience?

    Video in Lightning

    Subscribe Report : We can configure any Salesforce report to run Daily, Weekly or Monthly as HTML email to your Salesforce org. users. Advantages of…

    Salesforce Reports, Salesforce Lightning, Salesforce Lightning Experience, Salesforce Implementation, Learn Salesforce
    Abhay Feb 26, 2018
    2,047  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.