6

I have a feeling I know the answer is No, but wanted to check if anyone had any luck or quick workaround to my issue.

We use Account Contact Roles, but we want to allow specific profiles to add/edit certain contact roles.

For example, say we have 2 contact roles, 'Support Contact', and 'Purchasing Contact'. Now say we want only users with 'Support user' profile to be able to add/edit the support contact contact role, and only users with 'Sales rep' profile to be able to add/edit 'Purchasing Contact' contact role. Is this possible with the standard contact roles. Normally I could control this in a trigger, but as you can;t create triggers on contact roles I am stuck.

My Workaround

My gut is telling me we will need to create a custom object to emulate the contact role object and then we can use field permissions/triggers, whatever we want to do this, and it should be fairly straightforward.

My Question

Just want to make sure I am not overlooking anything prior to going down the road of custom development. Does someone have a solution other then the custom object that they have used?

2

Your gut feeling is correct. You can't restrict Contact Roles by the use of triggers. Keep in mind that a custom object will use 2kb of data storage per record, instead of the free cost that contact roles offer. Other than that drawback, this solution would work as you intend. Contact roles have no "additional" functionality that you'd have to consider.

| improve this answer | |
  • I was afraid of that. Thanks for the conformation. Much appreciated – Chris Duncombe Jan 4 '14 at 19:23
3

You should check out techtrekker's custom event handler functionality for Account and Opportunity contact role objects using Visualforce pages.

The recording of his DF talks is here: http://youtu.be/7QAWIPw5VIk

The Github repo is here: https://github.com/techtrekker/DF13-VF

I've not tried it, but I found it to be a particularly innovative solution.

| improve this answer | |
  • +1 thanks for this. Very interesting. I will look into this as well. Just good to know I wasn't missing anything obvious. Although I wish I could accept both answers, accepting @sfdcfox as he answered first – Chris Duncombe Jan 4 '14 at 19:22
  • Fair play...early bird gets the green check mark. I guess you could say I was outfoxed... :-) – pchittum Jan 6 '14 at 12:29

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.