+ Start a Discussion
PS81PS81 

No 'Insufficient Privilege' error show for custom VF page

When a user clicks on other opportunities of different department i see 'Insufficient Privilege' error shown on the screen but not observed for custom VF page.

How can i force the same functionality or error msg shown for the custom page? any advise please?


the same profile is used across different roles and hence Manager 1 can access all of his subordinates opportunities and same applies to manager 2. Subordinate of manager 2 shouldn't access subordinate's opportunity under manager 1. here all have access to the same custom VF page.
Krishna SambarajuKrishna Sambaraju
If you are using any custom controller for the visualforce page, make the class "with sharing" (public with sharing your_custom_class). Then it will take the sharing rules into consideration and display the message if they don't have the permission.
Arunkumar RArunkumar R
Hi,

Ensure that specific user profile has permission for the specific VF and Apex Class.