function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
edukondalu thodetiedukondalu thodeti 

When account is updated the child records of that account should be shared to another user programmatically

Hi
for these i created a child object with account has lookup field after that i didn't understand how to do these programmatically
i'm new and learning the salesforce 
pls help me with suggestions and reference link for these
ANUTEJANUTEJ (Salesforce Developers) 
Hi Edukondalu,

Can you elaborate the above scenario with an example to check further.

Looking forward to your response.

Thanks.
edukondalu thodetiedukondalu thodeti
Hi ANUTEJ
we need to create child object and created a lookup realtionship with the account.
while creating a child record we add the account to that child record 
when the account is updated the child objects records of that account need to be shared with another user who doesn't have the access 
ANUTEJANUTEJ (Salesforce Developers) 
I see that in the documentation there is an example of sharing the record with the help of apex and I think you can use this to modify as per your use case can you check this once if it addresses your problem:

>> https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm