AnswerBun.com

standard controller with extension

Salesforce Asked by Vivian on September 6, 2020

If we have standard controller with extension controller, extension runs in system mode generally. So now in this case extension controller, will it run in user mode? Provided i don’t have with sharing for extension controller

One Answer

the below link can provide you the details https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_def.htm

A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:

  1. You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
  2. You want to add new actions.
  3. You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.

Note:

Although custom controllers and controller extension classes execute in system mode and thereby ignore user permissions and field-level security, you can choose whether they respect a user's organization-wide defaults, role hierarchy, and sharing rules by using the with sharing keywords in the class definition. For information, see “Using the with sharing, without sharing, and inherited sharing Keywords”

Answered by JAK on September 6, 2020

Add your own answers!

Related Questions

Random image – corresponding text

2  Asked on December 22, 2020 by user48743

   

Upload ContentVersion to SF via JS

1  Asked on December 21, 2020 by vladimir-k

     

How to assign homepage layout to a profile in Eclipse?

1  Asked on December 19, 2020 by user18246

 

whatId when using custom object

4  Asked on December 18, 2020 by doga

 

Flow on Case Is Not Accessing Account

0  Asked on December 18, 2020 by moonpie

 

Single Email message with attachment not sending email

1  Asked on December 17, 2020 by prasad-nagamalli

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir