3

To start, I know that you can only use System.RunAs with test methods. Now that we got that out of the way, I have a trigger that is executing an operation that the current user can't do with their profile. I would prefer not to edit the validation rule to exempt certain profiles. I have heard that it may be possible accomplishing this by using a future method? Can someone explain how I would go about doing that? Or if there is a better way to do it? Let me know if there is any additional information I can provide to answer the question.

Thanks in advance!

Edit: I used the info from these links to get the answer. I hope this helps people that stumble on this issue in the future:

3
0

I used the info from these links to get the answer. I hope this helps people that stumble on this issue in the future:

1
  • 1
    You should add some information in your post about how you solved the issue. Links tend to break over time. – Adrian Larson Nov 8 '16 at 16:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.