English
delRelatedDatas
About 120 wordsLess than 1 minute
2025-09-22
dataUpdater.delRelateDatas(param)
Deletes related-object data.
Parameters
Description of param properties
| Property | Description | Type | Required | Notes |
|---|---|---|---|---|
| objApiName | Related object apiName | String | Yes | |
| relatedFieldName | Related field apiName | String | Yes | |
| recordType | Business type | String | No | Deletes data of the specified business type |
Return Value
Returns the deleted related-object data list.
Code Example
export default class Plugin {
apply() {
return [{
event: 'form.render.after',
functional: this.formRenderAfter.bind(this)
}]
}
formRenderAfter(context, plugin) {
context.dataUpdater.delRelateDatas({
objApiName: 'AccountObj',
recordType: 'default__c',
relatedFieldName: 'product_id'
});
}
}Notes
- If only
objApiNameandrelatedFieldNameare passed, all related-object data will be deleted. - If
objApiName,relatedFieldName, andrecordTypeare passed, data of the specified business type will be deleted. - If required parameters are missing, no action will be executed.
