Apex Sharing. Share access to records via apex class using ObjectShare.obj.

แชร์
ฝัง

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

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

    Thanks for a clear and detailed description about apex sharing. Please post more videos

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

    Tq

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

      You are welcome brother. Happy to help!!!

  • @user-be3dt2co6p
    @user-be3dt2co6p 8 หลายเดือนก่อน

    I have one question i only want to show thoes lead whoes event's description is not null otherwise it wont show how can we do that

    • @codewith_Khan
      @codewith_Khan  4 หลายเดือนก่อน

      Hi, first make sure the OWD setting of Lead object is "Private" then in your apex trigger add an if condition after the first "for loop" to check whether each lead's event description field is not null. The code snippet should look something similar like below:
      for(Lead newLead : trigger.new){
      if(newLead.EventDescription != null){
      for(User user : userList){
      ..............// Leadshare instance creation
      }
      }
      }
      Please subscribe the channel if not done already!!

  • @prasadpj8577
    @prasadpj8577 11 หลายเดือนก่อน

    Can you please tell me is share object available for every standard and custom object?. How it works can you answer

    • @codewith_Khan
      @codewith_Khan  11 หลายเดือนก่อน +1

      Hi, yes share object is available for almost all standard and custom objects. Basically its a junction object between sObject's record and user in this way for every record that is shared with any user there is a .shareobj record exists behind the scene.