English
setMdHidden
About 137 wordsLess than 1 minute
2025-09-22
Dynamically set an entire child object, or a certain record type of a child object, to hidden or visible.
Parameters
Description of param Properties
| Property | Description | Type | Default | Allowed Values |
|---|---|---|---|---|
| objApiName | Object apiName | String | — | — |
| recordType | Child object record type; when empty, controls the entire child object | String | — | — |
| 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 the child object
dataUpdater.setMdHidden({
objApiName: 'SalesOrderProductObj'
})
// Show the child object
dataUpdater.setMdHidden({
objApiName: 'SalesOrderProductObj',
status: false
})
// Hide a specified record type of the child object
dataUpdater.setMdHidden({
objApiName: 'SalesOrderProductObj',
recordType:"default__c"
})
// Show a specified record type of the child object
dataUpdater.setMdHidden({
objApiName: 'SalesOrderProductObj',
recordType:"default__c",
status: false
})
}
},