Error Message: redirect_URI_mismatch (Using Community User)
- This error message can happen when trying to generate a document using a community user or partner community portal.
- You can read more about why this issue is happening and find a resolution here in following article: https://developer.salesforce.
com/forums/?id= 906F000000099IfIAI
How to Resolve:
You need to modify your custom button code. We have listed an example of button code below using Lead as the example object:
Original Button Code
/apex/rsdoc__GenerateDocument?
Change Button Code To
{!URLFOR($Site.Prefix + ‘/apex/rsdoc__GenerateDocument