+ Start a Discussion
TheMythicalTheMythical 

Questions about keyword 'with sharing'

Hey, currently I ran into a problem that when I use the query [Select acr.Role From AccountContactRole acr where acr.AccountId = :userContact.AccountId and acr.ContactId = :userContact.Id] in a class with the keyword 'with sharing', it says: no such column Role in Object AccountContactRole, if I fire the query in a class without the keyword, it works fine. 

 

I am wondering do with sharing provide object level security or also field level security? thanks!

 

Sincerely

Shuchun

wesnoltewesnolte

Hey

 

You are correct. There are a few more details here .

 

Cheers,

Wes