• Bow Bharath
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I got a request to share the event with all the public group in org. I am thinking to implement it with trigger to create shareobject. 

But other thought, Why cant we use criteria based sharing with all internal users this avoid coding. 

what are all the users included in "All internal users" . Is it a good approach ?.

HI,today, I use AccountShare object, but I get two problems, first one is: Field(AccountShare's all field)  is not writeable

 

 The second is:insert not allowed on AccountShare.

 

 I hope the very grateful to help me to solve the master,thanks!!!

 

//my apex

AccountShare thisAccountShare = new AccountShare();  
              thisAccountShare.userorgroupid=userId;  
              thisAccountShare.accountid = accId;  
              thisAccountShare.accountaccesslevel = 'Edit';   
              thisAccountShare.ContactAccessLevel = 'Edit';
              listAccShr.add(thisAccountShare);

 

insert listAcShr;