Typically the OOTB sharing functionality from Salesforce falls down when thinking about sharing child record. Lets say you have a custom object under Account with Private OWDs. You want to give access to the child custom object to Account Team members who are in the Sales Team. You can either manually share the custom records with each relevant members or use automations.
What is the use case in real project where admin will have to share access programmatically?
Typically the OOTB sharing functionality from Salesforce falls down when thinking about sharing child record. Lets say you have a custom object under Account with Private OWDs. You want to give access to the child custom object to Account Team members who are in the Sales Team. You can either manually share the custom records with each relevant members or use automations.
thanks for the good explanation
Glad it was helpful!