Skip to main content

Custom Fields from DYCE Connect

Custom fields are the extensibility point of DYCE Connect: they bring a company's own data from DYCE Connect and Jira into Business Central, where developers and partners can build customizations on top of it.

In DYCE Connect, custom forms can add a company's own fields to time recordings and work orders. Work orders can also receive values from Jira through the DYCE - Set Custom Work Order Field automation action.

In Business Central, the values can be copied into the company's own fields, printed in its own reports, or used for project-specific logic.

Where the values are stored​

The values are stored in the field DYCE Connect Custom Fields of the Time Recording and the Work Order. In AL, the field is called CustomFields on both tables (DYCETimeRecording and DYCEWorkOrder). It is a Blob with JSON content and is meant for extensions, so the standard pages do not show it.

The field contains a JSON object with one key per custom field:

  • Fields from a custom form use the property of the field as key.
  • Values from Jira use the Jira field ID as key: customfield_10042 for a Jira custom field, or the ID of a standard Jira field such as assignee.
{
"category": "support",
"onSite": true,
"travelKm": 42,
"customfield_10042": "Contract 4711",
"assignee": "Jane Doe"
}

Data types​

Fields from a custom form are stored with the following JSON types:

Field in the custom formJSON typeExample
textField, textareaString"Server room 2"
numberFieldNumber42, 1.5
selectString (the value of the selected option)"support"
switchBooleantrue

The DYCE - Set Custom Work Order Field automation action copies the selected Jira fields to the work order. Text, numbers, and booleans are copied as-is. The action uses the display name for users, the option value for selections, and the name for statuses, priorities, and similar fields. It converts rich text to plain text and stores multiple values as an array. If a selected field is missing from the work item, the action skips it. An empty field can be stored as null.

Limits​

The serialized JSON object, including its keys, can have up to 4,096 characters. There is no separate limit per value, so a single long string counts against the 4,096 characters as well. The object can be nested up to 3 levels: the outer object is the first level, and each further object or array adds a level.

DYCE Connect checks these limits when a time recording, a time recording template or a work order is saved in DYCE Connect or through the Jira action. If a limit is exceeded, the whole save or update fails. Values written by an extension in Business Central should stay within the limits as well.

Synchronization​

The field is synchronized in both directions between DYCE Connect and Business Central. Changes made in Business Central are sent to DYCE Connect. A value appears in the custom form when the form includes a field with the matching property.

When an extension writes to the field in Business Central, the following applies:

  • The synchronization sends the field as a complete JSON object, and DYCE Connect takes it over as it is. To change a value, read the existing object, change or add the own keys, and write the complete object back. Writing only the own keys deletes all other values, in Business Central and, after the synchronization, in DYCE Connect as well.
  • This also applies to keys that DYCE uses itself: time recordings created in Jira carry the key jiraWorkLogId, which links them to the Jira work log, for example { "jiraWorkLogId": "11878" }. If it is lost, the link to the Jira work log is lost too.

The Jira action works additively: it sends only the selected fields, and DYCE Connect adds them to the keys already stored on the work order or updates their values. Other keys are kept.