Explain the With Sharing ,Without Sharing & inherit (User Context vs System Context) in Salesforce

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • Here, I have explain the With Sharing, Without Sharing in Salesforce and inherit sharing. Also covered all the related interview question and answer to help in interview sessions.
    Please like, share and subscribe the channel.
    Please find the below URL for interview question and answer on below topics.
    Batch Apex ( Asynchronous Process) Tricky interview question and answer with live demo and example.
    • Salesforce Apex Batch ...
    Future Method (Synchronous and Asynchronous) Tricky interview question and answer with live demo and example.
    • Future Method (Asynchr...
    WithSharing and Without Sharing (System Context, User Context and Inherit Context) interview question and answers with examples.
    • Explain the With Shari...
    Custom Setting - Latest Interview questions and answer asked in Accenture & TCS, with live demo and explanation.
    • Interview question and...
    Custom Metadata Setting - Latest Interview questions and answers asked in MNC, with live demo and explanation.
    • Salesforce Custom Meta...
    Production-Sandbox Overview with example.
    • Explanation of Salesfo...
    SOQL Error 101 (How to handle the SOQL 101 error in Salesforce)
    • What is SOQL 101 Error...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 11

  • @saikrishnaallampally3543
    @saikrishnaallampally3543 3 หลายเดือนก่อน

    Thank you

  • @wasidmasroor7985
    @wasidmasroor7985 ปีที่แล้ว

    very nicely explained

  • @aslambagwan6032
    @aslambagwan6032 2 ปีที่แล้ว

    Thanks

  • @salesforcent1848
    @salesforcent1848 2 ปีที่แล้ว +1

    I saw this video, but didn’t take seriously, got that withsharing with out sharing inner and outer class tricky question in an interview

  • @madhumohan7993
    @madhumohan7993 2 หลายเดือนก่อน

    Please clarify my doubt on with sharing and without sharing ,
    when class A is with sharing and class B is without sharing
    so when we call class B from class A , the sharing settings will respects class B right which is without sharing and everytime it does the same ? as when we call any class from other class the sharing settings respects from the class it called but not from where it is being called right ?
    Also another doubt is like when we have inherited sharing class , it always respects the parent class , i.e from where it is being called right ?
    What if we class A is not defined as with or without sharing and class B is with sharing then If we call class A from class B? and vice versa
    Can some one please give me a clarity on this ?

  • @shahirreturns
    @shahirreturns 2 ปีที่แล้ว

    what if a class A extends antother

  • @rajatrastogi9419
    @rajatrastogi9419 2 ปีที่แล้ว +2

    when trigger calls a handler and that handler class is declared without sharing and then class is further calling another class declared with sharing . what impact we will have on data in trigger.

    • @chiragkripalani2340
      @chiragkripalani2340 ปีที่แล้ว

      System Context --》System Context --》User Context . Data will be based on user's sharing rule.

  • @sushmamaurya5083
    @sushmamaurya5083 2 ปีที่แล้ว +2

    very informative session. Thanks very much!
    Question : public without sharing class Outer { public with sharing class inner {}}, in this case if outer class is default running in system mode then why do we use without sharing keyword?
    it can be like :
    public class Outer { public with sharing class inner {}}, so outer and inner will run in user mode?
    Kindly reply. Thank you

    • @sathyamurthymaila4658
      @sathyamurthymaila4658 ปีที่แล้ว +1

      I believe that here the intention is to make things clear so he has mentioned explicitly the keyword.