English
selectObject
About 196 wordsLess than 1 minute
2025-04-28
This method allows developers to select object data.
FxUI.objectUIAction.selectObject(objectApiName:String, options:Object)Parameters
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| objectApiName | Business object apiName (required) | string | — | — |
| options | Additional parameters | object | — | — |
Description of options (additional parameters)
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| target_related_list_name | Related list api_name (can be found on the settings page of the current field in backend management) | string | — | — |
| single | Whether single selection is enabled | boolean | — | false |
| maxNum | Maximum quantity limit | number | — | — |
| wheres | Filter conditions when querying related data | object | — | — |
| selected | Selected data | array | — | — |
| lookup_field_api_name | api_name of the corresponding lookup field | string | — | — |
| target_related_list_name | api_name of the related object list generated when the lookup field was created | number | — | — |
Parameter Example
{
single: true,
maxNum: 6,
selected: [{_id: "6577c0d0b4e20a000120a8bd"}] // ID of the data that needs to be filled back
}Return Value
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| objectApiName | Returned object name | object | — | value |
| objectList | Returned selected object data | object | — | value |
Code Example
This method returns a Promise object, as shown below:
import FxUI from 'fxui-mobile';
FxUI.objectUIAction.selectObject('AccountObj').then(res => {
// todo what you want
})
FxUI.objectUIAction.selectObject('AccountObj', {
single: true,
maxNum: 6
}).then(res => {
// todo what you want
})