Installation: Relationships Field limits preventing installation
Issue:
During installation, it is possible that some larger and older Organizations will hit their limit of available Salesforce Field relationships. The errors will only present themselves one at a time, so it is possible that you will need to resolve multiple issues in a single install.
Error Message:
(Activity.DealQuestion__c) Custom Relationship Limit Exceeded
Cannot create new relationship. Each Object can have no more than 25 custom relationships, including Master-Detail and Lookup relationships
ANSWER:
Remove a Custom Relationship field
or
Increase the limit to 50.
The 'soft' limit is 40. If you are currently using 40 custom relationships then you can submit a request to Salesforce to increase the amount to the 'hard' limit of 50.
ClosePlan requires 3 Custom Relationships
1 on the Opportunity Object
1 on the Activities (Task, Event) Object
1 on the Account Object
NOTE:
If you are already at 50 custom relationships, you must remove an unused or deprecated custom relationship on the Activity Object to install ClosePlan.
Please review your Custom relationships to find one to free up.
Troubleshooting
The client clearly had 37 Custom Relationship Fields on their Opportunity Object, but the install failed.
Solution: Go to the Object > Fields & Relationships > Deleted Fields.
Deleted Fields will count against the total until they are deleted by Salesforce 2 weeks after they are moved to the Deleted Fields list. The Client’s Salesforce Admin can delete the fields immediately to free up a needed field against the count.
A Report you can use to quickly find all fields in a Client’s Org
Here is a report you can use to find all the Custom Relationship Fields (except those in the ‘Deleted Fields’ list!)
Create a New Report Type
Go to Setup > Report types > click the ‘New Custom Report Type’ button
For Primary Object select Entity Definitions
Report Type Label and Name: Custom Relationship Lookup
Description: As needed
Store in Category: Other
Select "Deployed" > Next
Click "Click to relate another object' > ‘Field Definitions’ and select Each "A" record must have at least one related "B" record.' > Save
2) Create the Report
Create a new report and select Custom Relationship Lookup report type
Group Rows:
Qualified API Name (from the Entity Definition table)
Columns:
Relationship Name
Data Type
Filters:
Show Me: All entity definitions
Created Date: All Time
Is Customizable? equals True
Qualified API Name (from 'Field Definition' table) contains "__c"
Data Type contains lookup
Click Save & Run
Save the Report to the ClosePlan folder. If it does not exist, create it.
Your report will look similar to this: