{"record":{"id":"3a0924f397f16272","repo":"Budibase/budibase","slug":"row-not-found","errorCode":null,"errorMessage":"Row not found","messagePattern":"Row not found","errorType":"http","errorClass":"HTTPError","httpStatus":404,"severity":"error","filePath":"packages/server/src/sdk/workspace/rowActions/crud.ts","lineNumber":260,"sourceCode":"  rowActionId: any,\n  rowId: string,\n  user: User,\n  sourceId?: string\n) {\n  const table = await sdk.tables.getTable(tableId)\n  if (!table) {\n    throw new HTTPError(\"Table not found\", 404)\n  }\n\n  if (sourceId && isViewId(sourceId)) {\n    const result = await sdk.rows.search({\n      tableId,\n      viewId: sourceId,\n      query: { equal: { _id: rowId } },\n      limit: 1,\n    })\n    if (!result.rows.length) {\n      throw new HTTPError(\"Row not found\", 404)\n    }\n  }\n\n  const { automationId } = await get(tableId, rowActionId)\n  const automation = await sdk.automations.get(automationId)\n\n  const row = await sdk.rows.find(tableId, rowId)\n  await triggers.externalTrigger(\n    automation,\n    {\n      fields: {\n        id: row._id,\n        revision: row._rev,\n        row,\n        table,\n      },\n      user,\n      appId: context.getWorkspaceId(),","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/workspace/rowActions/crud.ts#L242-L278","documentation":"Thrown by run in packages/server/src/sdk/workspace/rowActions/crud.ts when a sourceId view is supplied and a row search on that view (query equal _id = rowId, limit 1) returns no rows. This guards execution so a row action only runs for rows actually visible through the given (non-calculation) view.","triggerScenarios":"Calling run(tableId, rowActionId, rowId, user, viewSourceId) where the row does not exist, exists but is filtered out by the view's query/filters, or belongs to a different table.","commonSituations":"Running actions against rows hidden by view filters — the row exists in the table but not in the view; passing a rowId from another table; the row was deleted between listing and running the action.","solutions":["Verify the rowId exists and satisfies the view's filters, or run the action with the table's base source (omit sourceId) if the view filter is excluding it legitimately.","Confirm the rowId belongs to the same tableId as the row action.","Re-fetch the row before running the action to handle deletion races."],"exampleFix":"// before\nawait rowActions.run(tableId, rowActionId, rowId, user, viewId) // row filtered out of view\n// after\nconst visible = await sdk.rows.search({ tableId, viewId, query: { equal: { _id: rowId } }, limit: 1 })\nif (visible.rows.length) await rowActions.run(tableId, rowActionId, rowId, user, viewId)","handlingStrategy":"validation","validationCode":"const result = await sdk.rows.search({\n  tableId,\n  viewId: sourceViewId,\n  query: { equal: { _id: rowId } },\n  limit: 1,\n})\nif (!result.rows.length) throw new Error(`Row ${rowId} is not visible through view ${sourceViewId}`)","typeGuard":null,"tryCatchPattern":"try {\n  await rowActions.run(tableId, rowActionId, rowId, user, viewId)\n} catch (e) {\n  if (e instanceof HTTPError && e.status === 404 && e.message === \"Row not found\") {\n    // retry with table-level source (omit sourceId) or skip — row filtered/deleted\n  } else throw e\n}","preventionTips":["Remember view filters: a row present in the table may be invisible to the view.","Re-check row existence immediately before running actions to avoid delete races.","Ensure rowIds are fetched from the same table/view the action targets."],"tags":["not-found","rows","views","row-actions","http-404"],"backgroundTag":"resource-not-found","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}