How to Extend Client Contacts Table Through Custom Data?
A Custom Data model can be used to add additional fields to the Clients table. This allows storing additional information about clients that is not included in standard system fields.
When Needed
- You need to add additional fields to the Clients table (for example, date of birth, additional contacts, special tags).
- You need to display custom data directly in the Clients table.
- You need to integrate additional client information from Custom Data.
What's Important to Know
- Extending contacts — option in a Custom Data model that allows adding fields to the Clients table.
- You need to add a
reg_user_idfield of type INTEGER with parameterunique: true. - User ID is not displayed in the interface — it can be found through the browser console.
- Data from the Custom Data table will appear in the Clients table for the corresponding client.
Prerequisites
You are logged in with administrator rights. You have navigated to the Custom Datamodule viaApps -> Custom Data.You know which additional fields need to be added to the Clients table.
Step-by-Step Instructions
- In the
Custom Datamodule, go to the "Create/Update" tab. - Create a new model or edit an existing one.
- Enable the "Use for extending contact fields" option.
- Add the required field:
- Field Name:
reg_user_id - Field Type: INTEGER
- Uniqueness: enable the
unique: trueoption
- Field Name:
- Add other fields that need to be displayed in the Clients table:
- Field name (for example, "Date of Birth", "Additional Phone")
- Field type (TEXT, DATE, INTEGER, etc.)
- Display settings (name, icon, color)
- Save the model.
Filling Data
After saving the model:
- Go to the "Data" tab in the Custom Data module.
- Create records for clients:
- In the
reg_user_idfield, specify the client ID (it can be found through the browser console) - Fill in other additional fields
- In the
- Save records.
💡 Tip: User ID is not displayed in the interface. It can be found through the browser console (F12 → Console → find client ID).
What Happens After
After saving the model with the enabled "Use for extending contact fields" option, added fields will be displayed in the "Clients" menu. In Custom Data records, you need to specify the client ID in the reg_user_id field. Data from the Custom Data table will appear in the Clients table for the corresponding client.
How to Verify It Worked
- Check that the "Use for extending contact fields" option is enabled.
- Make sure the
reg_user_idfield is added with type INTEGER and uniqueness. - Check that added fields are displayed in the Clients table.
- Create a test record with the correct
reg_user_idand check that data is displayed in the Clients table.