Configuration elements of the Object type
A configuration element of the Object type is a business entity that lets you declare a new ORM model class on the server core level. If you create an object, a new table with the same name and the same set of columns as the object is created on the database level. In other words, a Creatio object is a system view of a physical database table in most cases. The purpose of the object is to enable back-end Creatio development.
The items of the Add drop-down list in the toolbar of the Configuration section workspace represent the object types you can add in Creatio IDE.
View the object types in the figure below.
The Object schema type in the Type drop-down list in the toolbar of the Configuration section workspace represents the object. The object schema describes the list of object columns, indexes, and methods. Creatio platform does not limit the number of object columns. The number of object columns is limited by the maximum number of columns in the tables of the client database.
View the type of the object schema in the figure below.
Implement an object
The Object schema type represents the object.
To implement an object:
-
Open the Configuration section. Instructions: Open the Configuration section.
-
Select a user-made package to add the schema.
-
Add an object schema. To do this, click Add → Object in the section list toolbar. This opens the Object Designer.
-
Fill out the schema properties.
Property
Property value
Property description
Code required
The schema name
Starts with the prefix. Learn more: Manage configuration elements. Can contain Latin characters and digits. The object name can contain up to and including 128 characters. Oracle databases version 12.2 and earlier do not accept objects that have names longer than 30 characters.
Title required
The localizable schema title
The title of the configuration element schema is generated automatically and matches the value of the Code property without the prefix.
Package
The user-made package where you create the schema
The property is populated automatically and non-editable.
Description
The localizable schema description
-
Select the parent object in the Object Designer.
For the object to inherit the functionality of a different object, select the schema of the object to inherit in the Parent object property’s drop-down list. For example, to inherit the functionality of the
BaseEntity
object’s base schema, specify theBaseEntity
schema as the parent object. Creatio adds columns inherited from the parent object to the Inherited columns property of the object schema automatically. -
If the Parent object property contains a custom object, specify the object ID. Instructions: Specify the object ID. Creatio populates the Id property automatically if the Parent object property contains a base object.
-
Add an object index. Instructions: Add an object index.
-
Set up cascade connection for Lookup type columns (optional). Instructions: Set up the cascade connection.
-
Publish the schema.
If you need to generate the static content, update the database structure without configuration compilation, click Publish. This accelerates the development of objects and replacing objects.
If you need to generate the static content, update the database structure including configuration compilation, click Publish → Publish and compile. The object compilation on publishing is required if the embedded process of the object was saved while editing but not published in the Process Designer.
Specify the object ID for custom parent object
Since a Creatio object is a database table view, it must contain the ID column. Id is the system column that serves as the primary key in the database table.
To specify the object ID for custom parent object:
-
Click → Other → Unique identifier in the properties area of the Columns node’s context menu.
-
Fill out the column properties.
Property
Property value
Property description
Code required
The column name
Starts with the prefix. Learn more: Manage configuration elements. Can contain Latin characters and digits. We do not recommend using special characters. Make sure that the Code property is different from the Code of column's object. Otherwise, Creatio will display an error message when you attempt to publish the object.
Title required
The localizable column title
Data type
The column data type
Creatio populates the property automatically depending on the column type selected when adding a column. This is a non-editable field.
Description
The localizable column description
Required
Specify for the required columns
Select "Yes" since the column of the Unique identifier type is required for the object. If you attempt to save the object schema without the column of the Unique identifier type, Creatio displays a corresponding message.
Default value
The default column value
Instructions: Specify the default value for the column of the Unique identifier type.
Usage mode
Advanced
Creatio IDE supports the following column usage modes:
General is the standard column mode in the app.
Columns in the Advanced mode are displayed in the configuration and are available in the app.
Columns in the None mode are displayed as system columns in the configuration and are not available in the app.
Specify the default value for the column of the Unique identifier type
-
Click in the Default value property.
-
Fill out the default value properties.
Property
Property value
Default value type
System variable
System variable
New Id
Add an object index
Besides columns, Creatio IDE lets you add indexes to the object. Indexes are created automatically in the database table when you publish an object.
You can add an object index in the following ways:
-
Single column index. To do this, select the Indexed checkbox in the Behavior property block. Creatio indexes lookup columns by default.
-
Composite index. To do this, follow the instructions below.
To add a composite object index:
-
Click in the properties area of the Indexes node’s context menu.
-
Fill out the index properties.
Property
Property value
Code required
The schema name.
Unique
Select the checkbox to enable integrity constraints for index columns, i. e., remove the possibility of adding repeating value combinations.
Index Columns
Select the columns to add to the index. To do this, click Add in the Index Columns property block, select an object column, and specify the sorting order.
Set up the cascade connection
-
Add a Lookup type column (optional). To do this, click → Lookup in the context menu of the Columns node.
-
Move to the Data source property block.
-
Select or clear the Do not control integrity checkbox based on your business goals.
-
Select the option in the On lookup value deletion item block.
For example, set up a cascade connection to the Contact object connected to the Account object via the AccountId lookup column. To do this, select Account in the Lookup field.
The cascade connection setup options are as follows:
- If you need to delete the account without deleting the contacts connected to the account, select the Do not control integrity checkbox.
- If you need to confirm deletion the account without deleting the contacts connected to the account, do not select the Do not control integrity checkbox and select the Block deletion if there are connected records in current object with this value item, Creatio checks for connected contacts. If Creatio detects them, it displays a warning message asking you to confirm the deletion.
- If you need to delete both the account and connected contacts, do not select the Do not control integrity checkbox and select the Delete records from current object with this value option.
Implement a replacing object
The schema of the Replacing object type represents the replacing object. Learn more: Replace configuration elements.
To implement a replacing object:
-
Open the Configuration section. Instructions: Open the Configuration section.
-
Select a user-made package to add the schema.
-
Set up the package dependencies. You must add the package that contains the replaced object to the dependency list.
-
Add a replacing object schema. To do this, click Add → Replacing object on the section list toolbar. This opens the Object Designer.
-
Select the parent object to replace the functionality in the Parent object property’s drop-down list . For example, to replace the functionality of the
BaseEntity
object’s base schema, specify theBaseEntity
schema as the parent object. Creatio adds columns inherited from the parent object to the Inherited columns property of the object schema automatically. After you select the parent object, Creatio populates other object properties automatically. -
Implement the functionality that distinguishes the replacing object from the replaced object.
-
Publish the schema.
If you need to generate the static content, update the database structure without configuration compilation, click Publish. This accelerates the development of objects and replacing objects.
If you need to generate the static content, update the database structure including configuration compilation, click Publish → Publish and compile. The object compilation on publishing is required if the embedded process of the object was saved while editing but not published in the Process Design.
Deactivate object records
Creatio lets you deactivate object records to exclude them from the business logic. For example, this can be useful if the data is outdated and no longer used. You can deactivate records of any object.
To deactivate object records:
-
Open the schema of the object whose records to deactivate.
-
Select the Allow records deactivation checkbox in the Behavior property block.
-
Publish the schema.
Creatio can filter inactive records automatically for certain UI elements.
The automatic record filtering is available for the following UI elements:
- drop-down list
- lookup value selection box
- quick filter
The automatic record filtering is not available for the following UI elements:
- lookup content page
- section
- advanced filter
The UseRecordDeactivation
parameter of the EntitySchemaQuery
class lets you manage the filtering of inactive records. The default value is false
. If you set the UseRecordDeactivation
parameter to true
, the select query to the object that has record deactivation enabled will contain the filter that excludes inactive record.
View the example that deactivates records in the front-end below.
var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "MyCustomLookup",
useRecordDeactivation: true,
});
View the example that deactivates records in the back-end below.
var esq = new EntitySchemaQuery(userConnection.EntitySchemaManager, "ContactType") {
UseRecordDeactivation = true
};
esq.PrimaryQueryColumn.IsAlwaysSelect = true;
View the resulting SQL query below.
SELECT [ContactType].[Id] [Id]
FROM [dbo].[ContactType] [ContactType] WITH(NOLOCK)
WHERE [ContactType].[RecordInactive] = 0
Hide rarely used objects
Since version 8.0.6 Atlas, you can hide rarely used objects in Studio Creatio. To do this:
-
Open the schema of the object to hide.
-
Mark the object as hidden. To do this, select the Show in advanced mode only checkbox in the Behavior property block.
-
Publish the schema.
To view hidden objects, turn off the IsAdvancedObjectDisplayModeDisabled
feature. Instructions: Manage the status of an additional feature.
Update record fields automatically
Since version 8.0.7 Atlas, Creatio updates fields on an open form page automatically without the need to refresh the page. Learn more: Update form page fields automatically. This functionality is enabled for fields of directly linked records out of the box. To enable the functionality for record fields:
-
Open the schema of the object whose records to update.
-
Enable the functionality. To do this, select the Enable live data update checkbox in the Behavior property block.
-
Publish the schema.
Resources
Back-end development Creatio documentation