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 

Create a child object and create a lookup field with account. When billing country of the account is India. Share all the child records of this account to another user who doesn't have Access

Hi
pls help me
i am new and learning the salesforce and taking some real time works for my parctice
for these task i created a an object and lookup field with account,then attached the accounts with contains billing country=india and billing country not equals to india to the object.
if i write a sharing rule to account only accounts are share not the created object records.i didn't how to share the created object records when billing country of account =india.
pls any one help me 
ShirishaShirisha (Salesforce Developers) 
Hi Edukondalu,

Greetings!

Apex doesn't enforce object-level and field-level permissions by default, you can enforce these permissions in your SOQL queries by using WITH SECURITY_ENFORCED.Please refer the below thread for useful information:

https://developer.salesforce.com/forums/?id=9060G0000005hnvQAA

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri