English
addObject
About 134 wordsLess than 1 minute
2025-04-28
This method allows developers to create a business object.
FxUI.objectUIAction.addObject(objectApiName: String, options: Object)Parameters
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| objectApiName | Business object apiName (required) | string | — | — |
| options | Additional parameters required by the create form | object | — | — |
Description of options (additional parameters required by the create form)
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| mainObjectData | Pre-filled data for the main object | object | — | — |
| detailObjectDatas | Pre-filled data for detail objects. In create scenarios, this usually does not need to be passed externally because it is obtained internally | object | — | — |
Parameter Example
{
objectApiName: 'NewOpportunityObj'
mainObjectData: {
},
detailObjectDatas: {
}
}Code Example
FxUI.objectUIAction.addObject(objectApiName, options)
This method returns a Promise object, as shown below:
import FxUI from 'fxui-mobile';
FxUI.objectUIAction.addObject('AccountObj').then(res => {
// todo what you want
}).catch(err => {
// handle error
})