I'm trying to override the standard "* insufficient access rights on object id" error message for users who do not have "write" access to records. I'd like to change the message for better UI purposes.

My temporary fix is making a validation rule that mimics the behavior of the sharing rules I'm using but I'm not liking having to hard-code in profile names for the $Profile.Name part in the validation formula. Is there another way to override the message?

Note: I've seen the solutions on stack exchange for VisualForce Pages and using Permission Sets in the Validation Formula, neither are fixes for my problem.

  • Account.sObjectType.getDescribe().isCreateable you can check like this in your apex class. There is an object call objectpermission you can do soql there as well – Avijit Chakraborty May 31 '18 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.