{"record":{"id":"a82a829f006c9988","repo":"twentyhq/twenty","slug":"standard-application-is-missing-the-messagecampaig-a82a82","errorCode":null,"errorMessage":"Standard application is missing the messageCampaign name view column","messagePattern":"Standard application is missing the messageCampaign name view column","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-25/2-25-workspace-command-1785229970000-add-message-campaign-name-field.command.ts","lineNumber":158,"sourceCode":"        : [];\n\n    const viewFieldsToCreate: FlatViewField[] = [];\n\n    if (\n      !isDefined(\n        flatViewFieldMaps.byUniversalIdentifier[\n          NAME_VIEW_FIELD_UNIVERSAL_IDENTIFIER\n        ],\n      )\n    ) {\n      const standardNameViewField =\n        findFlatEntityByUniversalIdentifier<FlatViewField>({\n          flatEntityMaps: standardAllFlatEntityMaps.flatViewFieldMaps,\n          universalIdentifier: NAME_VIEW_FIELD_UNIVERSAL_IDENTIFIER,\n        });\n\n      if (!isDefined(standardNameViewField)) {\n        throw new Error(\n          'Standard application is missing the messageCampaign name view column',\n        );\n      }\n\n      const campaignIndexFlatView =\n        campaignObjectMetadata.viewUniversalIdentifiers\n          .map(\n            (viewUniversalIdentifier) =>\n              flatViewMaps.byUniversalIdentifier[viewUniversalIdentifier],\n          )\n          .filter(isDefined)\n          .find(\n            (flatView) =>\n              flatView.key === ViewKey.INDEX && !isDefined(flatView.deletedAt),\n          );\n\n      if (isDefined(campaignIndexFlatView)) {\n        viewFieldsToCreate.push({","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-25/2-25-workspace-command-1785229970000-add-message-campaign-name-field.command.ts#L140-L176","documentation":"Thrown by the 2.25 command that adds the messageCampaign name field, when resolving the standard view column (FlatViewField) for the name field. After confirming the workspace lacks the name view field, the command looks up the standard view field via findFlatEntityByUniversalIdentifier in the computed standard flat view field maps. If STANDARD_OBJECTS.messageCampaign.views.allMessageCampaigns.viewFields.name is absent from the standard definitions, the lookup returns undefined and the command throws.","triggerScenarios":"Running the command when twenty-shared/metadata does not define STANDARD_OBJECTS.messageCampaign.views.allMessageCampaigns.viewFields.name.universalIdentifier. Caused by version skew, or the view field was removed/renamed.","commonSituations":"Forked twenty-shared; older twenty-shared build; regression in standard view field definitions.","solutions":["Verify STANDARD_OBJECTS.messageCampaign.views.allMessageCampaigns.viewFields.name 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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before running, verify the standard view field exists in the installed definitions\nimport { STANDARD_OBJECTS } from 'twenty-shared/metadata';\n\nconst viewFieldUid =\n  STANDARD_OBJECTS.messageCampaign?.views?.allMessageCampaigns?.viewFields?.name?.universalIdentifier;\n\nif (!viewFieldUid) {\n  throw new Error('twenty-shared does not define messageCampaign allMessageCampaigns name view field — rebuild twenty-shared');\n}","typeGuard":"import { isDefined } from 'twenty-shared/utils';\n\nconst hasStandardViewField = (uid: string | undefined): uid is string =>\n  isDefined(uid) && uid.length > 0;","tryCatchPattern":null,"preventionTips":["Rebuild twenty-shared before running upgrade commands","Run with --dryRun first to confirm the standard view field resolves","Keep twenty-server and twenty-shared at the same release version"],"tags":["metadata","upgrade-command","standard-application","workspace-migration","flat-view-field","message-campaign"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}