RecordTypes Schema Reference
Overview
This reference article provides a detailed description of the RecordTypes table, which defines the record types available in our application. The schema for the RecordTypes table is crucial as it dictates both the categorization and behavior of different record types in the system.
RecordTypes Fields Schema
The following entries outline the Record Types schema for the RecordTypes table. The fields are organized into the following categories:
Core Fields
| Field Name | Type | Required | Default | Description | Additional Information |
|---|---|---|---|---|---|
| PartitionKey | string |
Yes | SiteId - Uniquely identifies the SharePoint site | Editing not recommended as it may lead to incorrect application operation | |
| RowKey | string |
Yes | SharePoint ContentType name | Editing not recommended as it may lead to incorrect application operation | |
| IsActive | boolean |
Yes | false | Controls whether the record type is available for use | Set to true only when all attributes are valid and ready for use |
| Category | string |
Yes | Groups record types into logical categories (e.g., Briefing, Correspondence, Event) | ||
| Order | int |
Yes | Controls position of record type and category in dropdown menus | Use large numbers (e.g., 101, 102) to better manage sorting | |
| Prefix | string |
Yes | Record type prefix used in record numbering | Editing not recommended as it may lead to incorrect application operation. | |
| StagesJson | string |
No | JSON array defining workflow stages and their order | Must follow specified JSON schema format | |
| Color | string |
No | Visual identifier for the record type | Can be HTML color name or hex value (e.g., red, #ff6347) | |
| IsCorrespondenceType | boolean |
No | false | Indicates if the record type is for correspondence |
Important Considerations
- Record Type Ordering
- Categories are sorted based on the lowest Order value of their contained record types
-
Use consistent numbering ranges for different categories (e.g., 100s for Briefing, 200s for Correspondence)
-
Stages Configuration
- StagesJson must follow this schema:
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Record Type Stages", "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string" }, "Order": { "type": "number" } }, "required": ["Name", "Order"] } }
Examples
Category and Order Example
| Category | Record Type | Order |
|---|---|---|
| Briefing | Ministerial Briefing (BMIN) | 101 |
| Briefing | Organisational Briefing (BORG) | 102 |
| Correspondence | Ministerial Correspondence (CMIN) | 201 |
| Event | Ministerial Event (EMIN) | 301 |
StagesJson Example
Example 1:
[{"Name":"Initiate","Order":1},{"Name":"Prepare and review","Order":2},{"Name":"Recommend","Order":3},{"Name":"Make decision: Allocate roles","Order":4},{"Name":"Make decision: Prepare and review","Order":5},{"Name":"Make decision: Recommend","Order":6},{"Name":"Make decision: Make decision","Order":7},{"Name":"Make decision: Manage signatures","Order":8},{"Name":"Implement and close","Order":9},{"Name":"Closed","Order":10}]
Example 2:
[{"Name":"Initiate","Order":13},{"Name":"Prepare and review","Order":2},{"Name":"Recommend","Order":3},{"Name":"Make decision: Allocate roles","Order":4},{"Name":"Make decision: Prepare and review","Order":5},{"Name":"Make decision: Recommend","Order":6},{"Name":"Make decision: Make decision","Order":7},{"Name":"Make decision: Manage signatures","Order":8},{"Name":"Implement and close","Order":9},{"Name":"Closed","Order":10},{"Name":"Custom","Order":2},{"Name":"Final","Order":12}]
Stages on field level
At the field level (RecordFields Table), you can specify the stages in which you want to display this field (works for the Role type). In the "Stages" column, you need to list the stages in which to display the role, separated by a semicolon.
Permanently removing Record Types
To permanently remove record type follow these steps: 1. Remove the record type from Record Types table in Azure 2. Remove all fields connected to the record type from Record Fields table in Azure 3. Remove all document libraries that used the corresponding content type 4. Remove the content type from SharePoint
Renaming a Content Type
It's not currently possible to rename an existing Content Type. You need to create a new one, then you can deprecate the old one.
