English
addRelatedDatas
About 113 wordsLess than 1 minute
2025-09-22
Add data to a related object.
Parameters
Description of param Properties
| Property | Description | Type | Required |
|---|---|---|---|
| objApiName | Related object apiName | String | Yes |
| relatedFieldName | Related field apiName | String | Yes |
| recordType | Record type | String | Yes |
| dataList | List of data to add | Array | Yes |
Return Value
Returns the newly added related object data list.
Code Example
{
event: "form.render.end",
functional: function (pluginExecResult, options) {
let {dataUpdater}=options;
// Add related object data
let addDatas = dataUpdater.addRelatedDatas({
objApiName: "relObj",
relatedFieldName: "relField",
recordType: "rt1",
dataList: [
{ name: "a" },
{ name: "b", dataIndex: "idx2" }
]
});
}
},Notes
- If required parameters are missing, no operation will be performed.
- Newly added data will automatically be supplemented with the
record_typeanddataIndexfields.
