English
getData
About 142 wordsLess than 1 minute
2025-09-22
This method synchronously returns the data of the current object being created or edited. In scenarios where both the main object and child objects are created together, it returns the data of the main object.
Parameters
None
Return Value
| Parameter | Description | Type |
|---|---|---|
| object_describe_api_name | Object apiName | String |
| _id | Object data ID; _id is empty for newly created data | String |
| name | Main property of the 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 data = context.getData();
console.log("context.getData: ", data)
}
}
}Notes
The data returned by this method is a
deepClonecopy. Directly modifying it will not affect the original data.let data = context.getData(); data.abc="123";// invalid console.log(context.getData().abc);// undefined
