Related Object List
# FxObjectDetailRelatedlist Component
Displays a data list of related objects.
# Attributes
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| apiName | Business object API name | String | - | - |
| dataId | Business object data ID | String | - | - |
| compInfo | Component description information | Object | - | - |
| hooks | Hook function before querying related object data | Function | - | - |
# compInfo
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| field_api_name | Association field name | String | - | - |
| header | Related object list title | String | - | - |
| ref_object_api_name | Related object API name | String | - | - |
| related_list_name | Related object list name | String | - | - |
This parameter can first configure a related object list, then copy the data through the view interface.
# Basic Usage
The component can be obtained via FxUI.component.get('ObjectDetailRelatedlist').
<template>
<object-detail-relatedlist v-bind="dTableOpts"></object-detail-relatedlist>
</template>
<script>
export default {
components: {
ObjectDetailRelatedlist: FxUI.component.get('ObjectDetailRelatedlist')
},
data() {
return {
dTableOpts: {
apiName: 'object_4jzj7__c',
dataId: '61baa65af9b3c2000171c53a',
compInfo: {
field_api_name: "field_4J1h2__c",
header: "Custom Object-2233",
ref_object_api_name: "object_esak6__c",
related_list_name: "target_related_list_qqefs__c"
}
}
}
}
}
</script>
# Component Extension
To meet enterprise customization requirements, we provide developers with several extension methods to quickly develop corresponding features.
# Hooks
Before rendering the object list page, it goes through a series of processes - such as initializing the table, requesting table configuration data, parsing table configuration data, requesting list data, parsing list data, etc. During this process, hook functions are executed, giving developers opportunities to add their own code at different stages.
<template>
<object-detail-relatedlist v-bind="dTableOpts"></object-detail-relatedlist>
</template>
<script>
export default {
components: {
ObjectDetailRelatedlist: FxUI.component.get('ObjectDetailRelatedlist')
},
data() {
return {
dTableOpts: {
apiName: 'object_4jzj7__c',
dataId: '61baa65af9b3c2000171c53a',
compInfo: {
field_api_name: "field_4J1h2__c",
header: "Custom Object-2233",
ref_object_api_name: "object_esak6__c",
related_list_name: "target_related_list_qqefs__c"
},
hooks: {
parseParam (param, table) {
// Parameters before requesting data
return param;
}
}
}
}
}
}
</script>
# Hooks
# hooks (Currently supported hooks)
| Parameter | Description | Type | Arguments | Return Value |
|---|---|---|---|---|
| getOptions | Extend related object list options | Function | options, table | Process and return the first argument |
| parseParam | Extend related object list request parameters | Function | param, table | Same as above |
| parseTerm | Extend related object list scenarios | Function | term, table | Same as above |
| parseData | Extend related object list data | Function | data, table | Same as above |
| parseColumns | Extend related object list column data | Function | columns, table | Same as above |
| parseBatchButtons | Extend related object list batch buttons | Function | batchButtons, layoutButtons | Same as above |
| parseTopButtons | Extend related object list top-right operation buttons | Function | layoutButtons | Same as above |
| getExtendAttribute | Extend related object list header request parameters | Function | attr, table | Same as above |