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 › Explain System.runAs() in Salesforce.

    Tagged: Account, Record Sharing, Salesforce Apex Code, System.runAs, Test Method

    • Salesforce® Discussions

      Explain System.runAs() in Salesforce.

      Posted by Aman on September 22, 2018 at 10:25 PM

      Explain System.runAs() in Salesforce.

      shariq replied 7 years, 11 months ago 2 Members · 1 Reply
      • Account
      • Record Sharing
      • Salesforce Apex Code
      • System.runAs
      • Test Method
    • 1 Reply
    • shariq

      Member
      September 22, 2018 at 10:25 PM

      Generally, all Apex code runs in system mode, and the permissions and record sharing of the current user are not taken into account. The system method, System.runAs(), lets you write test methods that change user contexts to either an existing user or a new user. All of that user’s record sharing is then enforced. You can only use runAs in a test method. The original system context is started again after all runAs() test methods complete.

    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

    appexchange

    Building Apps Using Salesforce AppExchange

    Blog in AppExchange, Salesforce

    Introduction Salesforce AppExchange was launched in 2005. Salesforce AppExchange is an Online Store just like the 'Play store' in Android phones. It is the marketplace…

    App Features, App Licensing, App on AppExchange, App on the AppExchange Market, AppExchange Security Review
    Anuj Sep 7, 2020
    6,293  Views

    Salesforce 3CX Integration | All You Need to Know

    Blog in Salesforce

    In the ever-evolving landscape of customer relationship management (CRM), businesses are constantly seeking innovative solutions to streamline communication and enhance efficiency. Salesforce 3CX Integration emerges…

    Automatic, Call, Catalyst, Collaboration, Communication
    Variance InfoTech Feb 23, 2024
    1,907  Views
    Salesforce Product - Sales Cloud

    Salesforce Product : Sales Cloud

    Blog in Sales, Salesforce, Salesforce Cloud Platform

    Salesforce: Sales Cloud Overview Sales Cloud is a part of CRM and a product of Salesforce which is mainly created for salespeople because it's such…

    Dashboards in Salesforce, Features of Salesforce Sales Cloud, Sales Cloud Data, Sales Cloud License, Sales cloud of Salesforce
    Archit Jan 29, 2018
    5,553  Views

    Popular Salesforce Videos

    Salesforce Einstein – CRM Stepping Into The World Of AI

    Salesforce Einstein – CRM Stepping Into The World Of AI

    Video in AI and ML

    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…

    Salesforce Chatter, Artificial Intelligence, Cloud Computing, Sales Cloud Einstein, Salesforce Cloud
    Algoworks Jan 11, 2018
    2,059  Views
    How to Create a Landing Page in Salesforce Account Engagement (Pardot)?

    How to Create a Landing Page in Salesforce Account Engagement (Pardot)?

    Video in Salesforce Admin

    A landing page acts as a customized doorstep for potential clients. It's crucial because it guides their focus toward a particular action, such as signing…

    Salesforce Tutorial, salesforce, Salesforce Video, Pardot, Salesforce Pardot
    ENWAY Jun 25, 2024
    716  Views
    Salesforce Marketing Cloud Connector for UiPath

    Salesforce Marketing Cloud Connector for UiPath

    Video in Salesforce Products, Marketing, Salesforce Cloud Platform

    This is a connector for Salesforce Marketing Cloud that allows you to work in the background with SFMC instance. watch this video and let us…

    Salesforce Training, Marketing Automation, Salesforce Marketing Cloud, Salesforce Video, Salesforce Learning
    Cristian Nov 19, 2020
    1,750  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.