• Nitish Yadav 45
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
I have few question on "with Sharing" and "without Sharing" keyword in apex,
In my Org the OWD for case is Public read only. I have one class where i am updating owner id of the case to some hard coded user id. The running user doesn't have edit access to that case and the class is running in "with sharing" mode but still he is able to update the owner of that case with that hard-coded user Id but when i am updating any other field along with owner id then the code is giving exception "insufficient Access on cross reference entity". The running user profile doesn't have "transfer records", "transfer Cases",  "Modify All Data" and not even "Modify All" on Case object. I tried checking UserRecordAccess table and i am getting only read access to that record for the running user and even no Implicit sharing as well.

Can someone please help me here : 
Did anyone face this issue before ??
Is my assumption correct that with sharing class doesn't check the access if we update only "ownerId" for that record ??

Thanks in advance.

Is there a specific permission required to deploy Lightning Web Components to a sandbox using sfdx deploy from VS Code?
We have created a custom profile that a developer is using, they have connected to a sandbox and are trying to deploy Lightning Web Components to that sandbox using the sfdx force:source:deploy command.
We get the following error:
Error when deploying a LWC