You need to sign in to do that
Don't have an account?
Pradeep Satpute 8
Want to check access on object for the user
if(usr.Division =='TURF'){
List<user>samelineofBuisnessUsers=[SELECT Id,email FROM User WHERE IsActive = true AND(Division =:usr.Division) AND(Id !=:usr.Id)];
for(user samedivuser : samelineofBuisnessUsers){
sendTo.add(samedivuser.email);
}
Hi In above code i want to add those user email in sendTo who has access on special Price object.please help how i can implement this
List<user>samelineofBuisnessUsers=[SELECT Id,email FROM User WHERE IsActive = true AND(Division =:usr.Division) AND(Id !=:usr.Id)];
for(user samedivuser : samelineofBuisnessUsers){
sendTo.add(samedivuser.email);
}
Hi In above code i want to add those user email in sendTo who has access on special Price object.please help how i can implement this
You can use the Schema Class to check permission.
Check the Object Permission: To Check the Field Permission: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_fields_describe.htm?search_text=isAccessible
Please mark as Best Answer if above information was helpful.
Thanks,
i dont want to check current user permision.I want to check the user which are samelineofBuisnessUser in this list.if they have access then only they will receive email