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
AbAb 

User not able to see record after manual share of lead by apex code

Hello,

I have a lead, whcih i shared mannually to a user by apex code using/
below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

User-added imageI can also see that lead is shared with user.
But when user see it it shows inssufiecuient proveliges.

what can be reason ?
Best Answer chosen by Ab
Deepali KulshresthaDeepali Kulshrestha
Hi Sandrine,

Please refer to the link below that may be helpful to you:

https://www.jitendrazaa.com/blog/salesforce/apex-based-sharing-in-salesforce/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha

All Answers

Test Company 13Test Company 13
check the lead object permission in profile of the user, if user does not have permission of that object in profile then sharing the record manually will not make it visible for that user.
Deepali KulshresthaDeepali Kulshrestha
Hi Sandrine,

Please refer to the link below that may be helpful to you:

https://www.jitendrazaa.com/blog/salesforce/apex-based-sharing-in-salesforce/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
This was selected as the best answer
AbAb
the user has access to the object. still he doenst se after manual share