Details
-
Type: New Feature
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: None
-
Fix Version/s: 1.6
-
Component/s: None
-
Labels:None
Description
Allow users to easily add "employer" name / relationship from the standard Individual contact add/edit form....
1. Add new field to this form - label = "Current Employer". I'd recommend placing this on the same line as the Website field - and making that field smaller so the 2 can sit side-by-side.
2. postProcess steps (if user enters a value in this field)...
2.1 When action = ADD:
- Check for existing contacts w/ type = Organization and organization_name = value entered by user
- If no match - create new contact Organization
- Create Employee Of.. relationship between new contact individual and contact organization
2.2 When action = UPDATE:
- For setDefaults() - check for existing Employee of relationship(s). If 1 - populate org_name in form. If > 1, use the one w/ the highest relationship.id value. If 0, that field is empty.
... for postProcess() - Check if we already have Employee of relationship w/ "matching" org name. If so, no change.
- If not, just add a new contact (if doesn't exist yet) and new relationship - even if there already is one. In other words, we will just add additional Employee of relationships - but not delete/remove old ones. And since setDefault() is showing the most recently added, this will make sense to user when view the results...