Registering a Record Type¶
A record type is the type of non-time-series fact data. Only by registering record types in Common Data Service can these record fields be queried through Common Data Service APIs. You can register record types in batches by uploading a template file.
Prerequisites¶
You need to be assigned the required asset permission and operation permission, and a menu group containing the Record Types menu. If not assigned, contact the application administrator.
If you need to specify the enumeration values of a record field to come from the dimensions in EnOS Configuration Center, Configuration Center needs to be obtained, authorized, and enabled in the current OU and the dimensions to be referenced need to prepared. For more information about dimensions in Configuration Center, see Configuring OU Business Objects.
Procedure¶
Select Business Object Elements > Record Types from the left navigation pane.
Select the Public Record Types or Private Record Types tab according to the effective scope of the target record type, and click Import. For more information about the difference between public and private record types, see Public/Private Record Types.
Click Download in the pop-up window and choose to download an Excel and a JSON template file.
Enter the following information in the template file. After the file is filled, click Upload in the pop-up window, select the filled file, and click OK.
Category |
Field Name |
Identifier |
Required/Optional |
Description |
---|---|---|---|---|
General Info |
Record Type ID |
recordType |
Required |
The identifier of the record type, which needs to be unique within the same (public/private) effective scope. |
General Info |
Record Type Chinese/English/Japanese/Spanish Name |
nameZh/En/Ja/Es |
English and Chinese names are required |
The record type name in different languages. |
General Info |
Related Data Source |
srcKey |
Required |
The unique key of the data source API. |
General Info |
Related Data Source Parameters |
dataSourceParam |
Optional |
The parameters of the data source. A data source may provide multiple types of records, and you can specify the record category in the data source by listing parameters. For example, {“recordType”:”WOWorkType”}, which specifies the recordType parameter to query the WOWorkType record in the data source. |
General Info |
Is Msg Enabled |
showSubMsg |
Optional |
Fill in Y if error messages need to be passed through, and fill in N if not. The default value is N. |
General Info |
Parent Record Type Info |
references |
Optional |
You can associate the record type with multiple parent record types using this format: {“recordType”:”SubCommand”,”foreignKeys”:{“controlRecordId”:”controlRecordId”}}. |
Field List |
Field Key |
field |
Required |
The unique key of the record field. |
Field List |
Field Chinese/English/Japanese/Spanish Name |
nameZh/En/Ja/Es |
English and Chinese names are required |
The field name in different languages. |
Field List |
Field Chinese/English/Japanese/Spanish Description |
descriptionZh/En/Ja/Es |
Optional |
The field description in different languages. |
Field List |
Data Type |
dataType |
Required |
The data type of the field. Use these data types: Integer, Object, String, timeStamp, JSONObject. |
Field List |
Unit |
units |
Optional |
Fill in the unit of the field data by referring to EnOS Built-in Units. |
Field List |
Expression |
expression |
Required |
Specify how the field is generated by entering a filed name to pass the field in data source through or by configuring an expression to implement lightweight calculation. |
Field List |
Is Sortable |
sortable |
Optional |
Fill in Y if the query results can be sorted in ascending/descending order and fill in N if not. |
Field List |
Filters |
filters |
Optional |
Specify how the field data in the query results is filtered. Use these filters: in, ==, !=, >, >=, <, <=. Separate multiple filters by commas, for example, ==,in. |
Field List |
Is I18n |
isl18n |
Optional |
Fill in Y or N based on whether the field returns results in the internationalization structure. The default value is N. |
Field List |
Is Returned in I18n |
extractl18n |
Optional |
Fill in Y or N based on whether the field returns results in a specified language. The default value is N. |
Field List |
Enum Source Type |
enumSourceType |
Required |
Fill in static if the enumeration values are static. Fill in record if the enumeration values come from the records in Common Data Service. Fill in amcDimension if the enumeration values come from the dimensions in Configuration Center. |
Field List |
Static Enumerate |
enumerate |
Optional |
For static enumeration values, you need to specify their identifiers and names. |
Field List |
Dynamic Enum Source ID |
enumerateSourceID |
Optional |
For enumeration values coming from record or amcDimension, you need to specify the identifiers of the record types or dimension tables. |
Field List |
Dynamic Enum Mapping |
enumerateMapping |
Optional |
For enumeration values coming from record or amcDimension, you need to specify the data fields in the record types or the dimension tables mapped with the identifiers and names of the enumeration values. |
Field List |
Is ID of Child Record Type |
isSubRecordType |
Optional |
Fill in Y if the field is associated with child record types, and fill in N if not. |
Field List |
Child Returned Fields |
subRecordFields |
Optional |
Specify the fields to be returned in the child record types. |
Note
The “Org ID”, “Org Name”, “Field Count”, “Updated On”, and “Updated By” fields in the template file can be left blank and will be filled by the system after upload.
When you register a private record type, if the identifier in the file is the same as a registered public record type identifier, the system will return the private record type when the duplicate identifier is passed in to query the record type.
Results¶
Once registered, the record type appears in the record type list. You can view its details and perform the following actions on it.
Edit the record type: Click Export, modify the template file as required, and import the modified file. The record types with the same identifiers will overwrite the existing record types, and the record types with different identifiers will be added.
Delete the record type: Click Delete
of the target record type. Deleted record types cannot be restored.