This update adds the ability to specify a custom relationship name when using the Quick Create mode in the Link Button extension. Previously, the extension assumed the relationship name always followed the pattern entityType.toLowerCase() + 'Id', which was not always correct.
- Fixed button display issues where buttons were showing as text fields
- Ensured proper template loading for all view modes (detail, list, edit)
- Added default values for style and buttonSize to prevent empty button rendering
- Removed URL validation requirement for Quick Create, EspoModal, and Workflow modes
- Now accepts URLs starting with
#(e.g.,#Notes,#Contact/view/123)
- Added
relationshipNameparameter to the field metadata (link-button.json) - This field is only visible when "quickCreate" mode is selected
- Includes a tooltip explaining its purpose
- Created
relationship-name.jsview that extends varchar field - Shows/hides the relationship name field based on the selected mode
- Located at:
files/client/custom/modules/link-button/src/views/admin/field-manager/fields/relationship-name.js
- Modified
actionQuickCreate()function inlink-button.js - Now checks for the
relationshipNameparameter - If specified, uses the custom relationship name to link records
- If not specified, falls back to the original behavior (using entity type in lowercase)
- Added label "Relationship Name" in
Admin.json - Added tooltip in
FieldManager.jsonexplaining the field's purpose
-
When creating or editing a Link Button field:
- Select "Quick Create" as the mode
- A new field "Relationship Name" will appear
- Enter the exact relationship name (e.g., "account", "contact", "parentAccount")
- If left empty, the system will use the default pattern (entityType.toLowerCase())
-
The relationship will be properly established when creating new records through the Quick Create modal
If you have a custom relationship where Opportunities are linked to Accounts via a relationship named "primaryAccount" instead of just "account":
- Set Mode: Quick Create
- Set Relationship Name: primaryAccount
- The new record will be linked using
primaryAccountIdandprimaryAccountName
This update maintains full backward compatibility. Existing Link Button fields will continue to work as before, using the default entity-based relationship naming pattern.