English
getDescribe
About 144 wordsLess than 1 minute
2025-09-22
This method synchronously returns the object metadata of the current object being created or edited. In scenarios where both the main object and child objects are created together, it returns the metadata of the main object.
Parameters
None
Return Value
Standard object metadata: object_describe
| Parameter | Description | Type |
|---|---|---|
| api_name | Object apiName | String |
| display_name | Object name | String |
| fields | All fields of the object | Object |
Code Example
export default function (context) {
return {
/** After the create/edit page has finished rendering, log the metadata of the current object and display the object name in a modal. */
renderEnd(){
let describe = context.getDescribe();
console.log("context.getDescribe: ", describe)
wx.showModal({
content: describe.display_name,
showCancel: false
})
}
}
}Notes
Do not modify any property in the returned object metadata, as it may lead to unexpected results.
context.getDescribe().testkey="";// forbidden let describe = context.getDescribe(); describe.testkey="";// forbidden describe.fields.testkey="";// forbidden
