English
setMdSingleBtnHidden
About 135 wordsLess than 1 minute
2025-09-22
Dynamically set the single-row buttons of specified data under a certain child object record type to hidden or visible.
Parameters
Description of param Properties
| Property | Description | Type | Default | Allowed Values |
|---|---|---|---|---|
| objApiName | Object apiName | String | — | — |
| recordType | Child object record type | String | — | — |
| dataIndex | Child object data dataIndex | String | — | — |
| btnApiName | Button apiName | String|Array | — | Delete button: Delete_button_default |
| status | Whether to update to hidden state | Boolean | true | true: hiddenfalse: visible |
Return Value
None
Code Example
{
event: "form.render.end",
functional: function (pluginExecResult, options) {
console.log("custom plugin: form.render.end exec");
let {dataUpdater}=options;
// Hide a single-row button of a child object
dataUpdater.setMdSingleBtnHidden({
objApiName: 'SalesOrderProductObj',
recordType: 'default__c',
dataIndex: '1',
btnApiName: ['Delete_button_default'],
})
// Show a single-row button of a child object
dataUpdater.setMdSingleBtnHidden({
objApiName: 'SalesOrderProductObj',
recordType: 'default__c',
dataIndex: '1',
btnApiName: ['Delete_button_default'],
status: false
})
}
},