You need to sign in to do that
Don't have an account?
Pascal
Visualforce/Extension or Just Apex
Community:
I have a requirement that I'm not sure how to go about implementing. In a nutshell, I want users to edit a campaign if the user's region (a custom field) matches the campaign's region (another custom field). If there is a match, the edit is allow; otherwise, the edit is not allowed.
Should I be overriding the edit functionality with VF/Controller extensions, of is this a case of Apex Sharing? I don't necessarialy want to hide records, just prevent the editablility of some.
Thanks.
Pascal,
Given the parameters of the problem, the simplest solution is to override the Edit button with an APEX page, having the page check the conditions and then re-directing the Campaign Edit only if the conditions are ok.
Implementing with Sharing rules would be messier than what it is worth in my humble opinion.
Hope this helps.