You can create document ID fields to reference any record on any table.
Avant de commencer
Role required: personalize_dictionary
Pourquoi et quand exécuter cette tâche
In comparison, a reference field references a record on a specific table. To
reference records from any table, two fields need to work together—one to store the
table reference and another to store the record reference.
You can select the document ID type when creating a new field.
Procédure
-
Navigate to the form view for the table.
-
Right-click the header and select .
-
Create a field to store the table name and click Add.
- Name: Any label (for example, Model
table)
- Type: String
-
Create a field to store the record reference and click
Add.
- Name: Label for your document ID field (for
example, Model ID)
- Type: Document ID
-
Click Save.
-
Right-click the form header and select .
-
Open the dictionary entry for the document ID field.
-
Under Related Links, click Advanced
view.
-
In the Dependent field, enter the column name of the
table reference field (for example, u_model_table).
- Facultatif :
In Attributes, add the
show_all_tables dictionary attribute to display system
tables.
-
Click Update. When users click the reference lookup
for the document ID field, a dialog appears that allows them to select the
table and then the record. The sys_id of the selected record is stored in
the document ID field and the table name is stored in the table reference
field.
- Facultatif :
Configure the form to remove the table reference field.