function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nikhil MoreNikhil More 

Redirecting user to custom page if registration fails

I am writing a trigger on User object. The scenario is that if some user from a particular domain is invited then as usual this person will receive chatter invite and can register if he is not part of org. I have written a trigger user_before_insert will add an error if the user's email ID is of particular domain and it is working fine.

 

PS: When the insert user fails during this external chatter user is trying to register Salesforce shows on error page 'User account could not be created' instead of this can i redirect my user to a custom VF page? how?

Thanks in Advance!!