English
getDetailData
About 191 wordsLess than 1 minute
2025-09-22
This method synchronously returns a copy of the current data of the specified child object.
Parameters
| Parameter | Description | Type |
|---|---|---|
| apiName | Object apiName | String |
Return Value
Return Value Example
Array type. The structure of a single child object data item is shown below:
[
{
"object_describe_api_name":"",
"_id":{},
"name":"",
"dataIndex":"1",
...
},
...
]Standard object data object_data properties
| Property | Description | Type |
|---|---|---|
| object_describe_api_name | Object apiName | String |
| _id | Object data ID; _id is empty for newly added child data | String |
| name | Main property of the object data | String |
| dataIndex | Temporary unique index of the child object data | String |
| [fieldApiName] | Values of various custom fields, where the key is the field apiName | * |
Code Example
export default function (context) {
return {
/** After the create/edit page has finished rendering */
renderEnd(){
let datas = context.getDetailData("SalesOrderProductObj");
console.log("context.getDetailData: ", datas);
}
}
}Notes
The data returned by this method is a
deepClonecopy. Directly modifying it will not affect the original data.let datas = context.getDetailData("SalesOrderProductObj"); datas[0].abc="123";// invalid console.log(context.getDetailData("SalesOrderProductObj")[0].abc==="123");// false datas = context.getDetailData("SalesOrderProductObj"); datas[0]="123";// invalid console.log(context.getDetailData("SalesOrderProductObj")[0]==="123");// false
