How to Extend Client Contacts Table Through Custom Data?
If you need to add fields to the client card that are not in the standard table (date of birth, additional phone, VIP tag), you can use Custom Data with the "Use for extending contact fields" option. Data from Custom Data will appear in the Clients table for the corresponding client.
For new projects: Prefer Client Fields (Menu → Settings → Client fields). Client Fields is the standard way to add custom fields. Custom Data with contact extension is for existing projects that already use it.
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.
Related Materials
- Custom Data patterns and examples — when to use Custom Data vs Client Fields
- Create model
- Add field to model
- Configure field type