Deletes the specified record from the specified table
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| sysId | string | - | |
| tableName | string | - | |
| sysparmQueryNoDomain | boolean | - |
Output Schema
Usage Examples
Delete a test Incident by sys_id
Use this to remove a test Incident created earlier in the scaffolding flow. Place this after steps like fetch:template and before publish:github if you are cleaning up test data.
steps:
- id: deleteIncident
action: servicenow:now:table:deleteRecord
input:
tableName: incident
sysId: ${{ parameters.incidentSysId }}Delete a Change Request across all domains
Delete a Change Request while ignoring domain separation. Use this when you need a domain-agnostic deletion such as in central cleanup jobs.
steps:
- id: deleteChangeRequestAnyDomain
action: servicenow:now:table:deleteRecord
input:
tableName: change_request
sysId: 0f12abcdc0a8016400e0f5b5c1bdaf0c
sysparmQueryNoDomain: trueDelete a Task while respecting domain separation
Delete a Task only within the current domain context. Use this when domain separation is enforced and you must not affect records in other domains.
steps:
- id: deleteTaskInDomain
action: servicenow:now:table:deleteRecord
input:
tableName: task
sysId: ${{ parameters.taskSysId }}
sysparmQueryNoDomain: falseCleanup a CMDB CI server record after a failed provision
Use this to remove a CMDB CI server record that was created but the provisioning failed. Run this near the end of your workflow after verification steps like catalog:register.
steps:
- id: deleteCmdbServer
action: servicenow:now:table:deleteRecord
input:
tableName: cmdb_ci_server
sysId: ${{ parameters.serverSysId }}Remove a Service Catalog Request Item
Delete a Service Catalog Request Item created for a one-time action. Use domain-agnostic deletion when cleanup spans multiple domains.
steps:
- id: deleteRequestItem
action: servicenow:now:table:deleteRecord
input:
tableName: sc_req_item
sysId: 7c5b1e90db220010a2b7f7a1f54bcb3b
sysparmQueryNoDomain: true