Overview
This guide explains the required steps to configure a Document Creation Button and link it to a relationship field. This configuration ensures that documents generated from a record are automatically linked to the specified destination field.
Prerequisites
- Template uploaded to the platform.
- An existing Object.
- A Form associated with the target Object.
Required Permissions
- Admin Permissions to modify Schema configurations, Form layouts and Component settings.
Configuration Steps
Phase 1: Configure the Document Field
- Open Control Center and select Schema.
- Navigate to Data and select the target Object.
- Open the Fields tab.
- Select the Documents field.
- Optionally, the Field Type can be set to Relationship.
- Ensure the Related Object is set to Document.
- Enable the List toggle to allow multiple upload documents.
Note: If the List toggle is disabled, it will accept only a single relationship and the generated document will replace any existing one, If this toggle is enabled, the newly generated document will be appended and the previously related documents will not be modified.
- Open the Settings tab.
- In the Allow for section, add Document Generation.
- Click Save.
Phase 2: Create the Document Generation Button Component
- Open Control Center and select Schema.
- Navigate to Views, select Components, and click + New Component.
- A Name must be entered for the component.
- In the Type dropdown, select Button.
- In the Button Label enter a name for the button.
- In the Sub type dropdown, select Document Creation.
- A Context should be defined (for example, Project).
- In the Document Related Object, select the target object.
- In the Document Related Field dropdown, select the Field configured in Phase 1.
Note: Select the Field is mandatory, the generated document will be automatically related to it upon generation.
- Select the required templates from the Templates dropdown.
- Click Save.
Phase 3: Add the Button to the Form
- Open Control Center and select Schema.
- Navigate to Forms and select the target Form settings.
- Select the Designer tab.
- From the toolbox menu, select Docgen Button and drag and drop it into the form layout.
- In the Button Settings panel on the right, the Button Action must be assigned to the component created in Phase 2.
- Click Save.
Validation
- Open the Projects workspace and select the project containing the configured form.
- In the form layout, locate the Document Creation Button and click it.
- If multiple Templates were assigned during configuration, a dropdown menu is displayed to select the specific template. The button label will update its name accordingly.
Example: A user generates a demand letter using the Document Creation Button and expects it to be automatically linked to the Documents relationship field, making it easily accessible directly from the form.
Expected Results
- The generated document is automatically linked to the configured relationship field without manual intervention.
- If the relationship field contains more than five documents, a Show more option is displayed to reveal the remaining items.
Common Issues
Issue: The generated document is not linked to the relationship field automatically.
- Possible Causes: The Admin did not configure a destination field during the button component setup.
- Diagnostic Steps: Check the component configuration to verify if a field is selected.
- Resolution Steps: Navigate to Schema -> Views, select Components tab and edit the Document Creation button. Ensure the correct field is selected in the Document Related Field dropdown.
Issue: The button does not generate any document or display a selection menu.
- Possible Causes: No templates were assigned to the button during the component creation process.
- Diagnostic Steps: Click the button in the live form; if no action occurs, the template association is missing.
- Resolution Steps: Navigate to Schema -> Views, select Components tab and edit the button component to select one or more templates in the Templates field.