English
setMdNormalBtnHidden
About 124 wordsLess than 1 minute
2025-09-22
Dynamically set the common buttons of 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 | — | — |
| btnApiName | Button apiName | String|Array | — | Add one row: Single_Add_button_defaultBatch add button: Batch_Lookup_Add_button_${lookupFieldApiName} |
| 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 common buttons of a child object
dataUpdater.setMdNormalBtnHidden({
objApiName: 'SalesOrderProductObj',
recordType: 'default__c',
btnApiName: ['Single_Add_button_default'],
})
// Show common buttons of a child object
dataUpdater.setMdNormalBtnHidden({
objApiName: 'SalesOrderProductObj',
recordType: 'default__c',
btnApiName: ['Single_Add_button_default'],
status: false
})
}
},