English
md.del.after
About 179 wordsLess than 1 minute
2025-12-15
This hook is triggered after child-object data is deleted, including batch deletion, and before UI events/calculation logic are executed. It allows extra business actions, including but not limited to modifying main and child object field values.
- Modify field values of the main object and child objects
Parameters
| Parameter | Description | Type |
|---|---|---|
| Common parameters | See details | -- |
| objApiName | Child object apiName | String |
| recordType | Child object record type | String |
| delDatas | Deleted child-object data | Array |
Return Value
None
Basic Example
Intercept deletion
export default class Plugin {
apply() {
return [{
event: 'md.del.after',
functional: this.mdDelAfter.bind(this)
}]
}
// If this is a middleware plugin in a vcrm project, swap the interaction parameter positions
// mdDelAfter(plugin, context)
mdDelAfter(context, plugin) {
// todo what you want
return Promise.reject()// intercept
}
}Notes
1. Child-object data obtained through context APIs in this hook includes the deleted data
When object data is retrieved through context APIs in this hook, the data has not yet been physically removed from the context result, so it can still be found.
