You need to sign in to do that
Don't have an account?

Overriding insufficient error message
hi,
I have a requirement in which if user click on the link in the related list and if user doesnt have permissions to view that record ,he will get an error message " insufficient Privelages ....".I want instead of this message user should be taken to some other page where he can add that record to his territory.
Any idea how we can achieve this.
Thanks
RJoshi
Hi,
You can use below code snippet to override the insufficient Privileges error message.
Try{}
Catch(Exception e)
{
If(e.getmessage() == ‘Insufficient Error………’)
{
Page Reference pr = Page. RedirectPage;
pr.setRedirect(true);
return pr;
}
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi ,
Thanks for your reply .
But this is a standard functionality so i should replace the related list with an inline vf page and there in extension class i can use this logic.
Hi,
Yes you can embed the inline VF page and display your related list on that VF page and use the extension controller for your business logic
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.