Apex Sharing. Share access to records via apex class using ObjectShare.obj.
ฝัง
- เผยแพร่เมื่อ 12 พ.ค. 2023
- Share access to records via apex class using ObjectShare.obj.
Explained the feature with best real time scenario.
#salesforce #sfdc #apex #sharing - วิทยาศาสตร์และเทคโนโลยี
Thanks for a clear and detailed description about apex sharing. Please post more videos
Tq
You are welcome brother. Happy to help!!!
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
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!!
Can you please tell me is share object available for every standard and custom object?. How it works can you answer
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.