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.
Procedure¶
Select Meta Data > 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.
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 theWOWorkType
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 inN
if not. The default value isN
.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 inN
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
orN
based on whether the field returns results in the internationalization structure. The default value isN
.Field List
Is Returned in I18n
extractl18n
Optional
Fill in
Y
orN
based on whether the field returns results in a specified language. The default value isN
.Field List
Enum Source Type
enumSourceType
Required
Fill in
static
if the enumeration values are static. Fill inrecord
if the enumeration values come from the records in Common Data Service. Fill inamcDimension
if the enumeration values come from the dimension tables 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
oramcDimension
, you need to specify the record type or dimension table identifiers.Field List
Dynamic Enum Mapping
enumerateMapping
Optional
For enumeration values coming from
record
oramcDimension
, you need to specify the data fields in record types or 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 inN
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.
Click Upload in the pop-up window. Select the filled template file and click OK.
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.