# FxUI.objectUIAction.selectObject(objectApiName, options)
This method allows developers to select object data.
# parameter
parameter | illustrate | type | optional value | Defaults |
---|---|---|---|---|
objectApiName | Business object apiName (required) | string | — | — |
options | Other parameters | object | — | — |
# options
parameter | illustrate | type | optional value | Defaults |
---|---|---|---|---|
target_related_list_name | Association list api_name (can be seen in the background management of the current field setting interface) | string | — | — |
single | Whether to choose | boolean | — | false |
maxNum | Maximum quantity limit | number | — | — |
wheres | Filter conditions when looking up related data | object | — | — |
selected | selected data | array | — | — |
lookup_field_api_name | The api_name of the corresponding lookup field | string | — | — |
target_related_list_name | The api_name of the associated object list generated when the lookup field is created | number | — | — |
# result
{
objectApiName,
objectList: Array
}
# usage
The method returns one Promise object
, an example is as follows:
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
})