Creating Custom Button Code for Partner Communities & Salesforce Internal
When using custom buttons in partner community and Salesforce internal, you need to check the following:
- Make sure the community user is an assigned Opero Documents user.
- Make sure any community you are using is ACTIVE and PUBLISHED. This will make the community domain active.
- Make sure your custom button is both on Classic layout and community page layout.
- Then Modify Button Code:
You need to modify button code to include “{!URLFOR($Site.Prefix + ‘/” at the beginning of the button code that is showing at bottom of document action.
Example of original button code in Document Action:
/apex/rsdoc__GenerateDocument?
Example of how to change button code to work with Partner Community:
{!URLFOR($Site.Prefix + ‘/apex/rsdoc__GenerateDocument
This button format needs to be used in communities and salesforce internal to avoid URI mismatch error message. Salesforce article showing this is common issue with these types of org’s: https://developer.salesforce.com/forums/?id=906F000000099IfIAI.
If community customers have issue with redirecting to login page when use (redirect, email preview, template preview) then have system admin in Salesforce go to System Administrator profile -> Session Settings -> and enable “Separate Experience Cloud site and Salesforce login authentication for employees.”