twentyhq/twenty · critical · Error
Standard application is missing workflow field coreWorkflowI
Error message
Standard application is missing workflow field coreWorkflowId
What it means
Thrown by the 2.23 command that adds the coreWorkflowId soft-ref field to the workflow object. After confirming the workspace has a workflow object but lacks coreWorkflowId, the command looks up the standard field via findFlatEntityByUniversalIdentifier in the computed standard flat field metadata maps. If STANDARD_OBJECTS.workflow.fields.coreWorkflowId is absent from the standard definitions, the lookup returns undefined and the command throws.
Source
Thrown at packages/twenty-server/src/database/commands/upgrade-version-command/2-23/2-23-workspace-command-1784286706000-add-workflow-core-soft-ref-field.command.ts:93
{ workspaceId },
);
const { allFlatEntityMaps: standardAllFlatEntityMaps } =
computeTwentyStandardApplicationAllFlatEntityMaps({
now: new Date().toISOString(),
workspaceId,
twentyStandardApplicationId: twentyStandardFlatApplication.id,
});
const standardField = findFlatEntityByUniversalIdentifier<FlatFieldMetadata>(
{
flatEntityMaps: standardAllFlatEntityMaps.flatFieldMetadataMaps,
universalIdentifier: CORE_WORKFLOW_ID_FIELD_UNIVERSAL_IDENTIFIER,
},
);
if (!isDefined(standardField)) {
throw new Error(
'Standard application is missing workflow field coreWorkflowId',
);
}
if (isDryRun) {
this.logger.log(
`[DRY RUN] Would add coreWorkflowId field for workspace ${workspaceId}`,
);
return;
}
const flatFieldMetadataToCreate: FlatFieldMetadata = {
...standardField,
viewFieldIds: [],
viewFieldUniversalIdentifiers: [],
};
View on GitHub (pinned to 1f5dd2bbd2)
Solutions
- Verify STANDARD_OBJECTS.workflow.fields.coreWorkflowId exists in the installed twenty-shared package
- Rebuild twenty-shared: npx nx build twenty-shared
- Ensure twenty-server and twenty-shared are at the same release tag
- Run with --dryRun first to confirm the standard field resolves
Defensive patterns
Strategy: validation
Validate before calling
// Before running, verify the standard field exists in the installed definitions
import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
const fieldUid = STANDARD_OBJECTS.workflow?.fields?.coreWorkflowId?.universalIdentifier;
if (!fieldUid) {
throw new Error('twenty-shared does not define workflow.fields.coreWorkflowId — rebuild twenty-shared');
} Type guard
import { isDefined } from 'twenty-shared/utils';
const hasStandardField = (uid: string | undefined): uid is string =>
isDefined(uid) && uid.length > 0; Prevention
- Rebuild twenty-shared before running upgrade commands
- Run with --dryRun first to confirm the standard field resolves
- Keep twenty-server and twenty-shared at the same release version
- Add integration tests verifying standard field identifiers
When it happens
Trigger: Running 'upgrade:2-23:add-workflow-core-soft-ref-field' when twenty-shared/metadata does not define STANDARD_OBJECTS.workflow.fields.coreWorkflowId.universalIdentifier. Caused by version skew between twenty-server and twenty-shared, or the field was removed/renamed.
Common situations: Forked twenty-shared where workflow fields were customized; running against an older twenty-shared build that predates coreWorkflowId; a regression in standard definitions.
Related errors
- Standard application is missing workflowVersion field coreWo
- Failed to add coreWorkflowVersionId field for workspace ${wo
- Failed to add coreWorkflowId field for workspace ${workspace
- Standard application is missing the messageCampaign name fie
- Standard application is missing messageList view ${LIST_VIEW
AI-assisted analysis of twentyhq/twenty@1f5dd2bbd2 (2026-08-12).
Data as JSON: /api/errors/fb8d548870099163.
Report an issue: GitHub.