English
fetch_data
About 226 wordsLess than 1 minute
2025-04-28
This method allows you to retrieve a specific business object record.
FxUI.objectApi.fetch_data(apiName:String, dataId:String) <Preview text="Preview (the current browser must be logged in to a Fxiaoke account)" cmpName='fetchData'/>Parameters
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| apiName | Business object apiName (required) | string | — | — |
| dataId | Business object data ID (required) | string | — | — |
Return Value
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| key | Returns the api_name of the object's field | any | — | value |
key is the field api_name, and value is the corresponding field value.
Code Example
This method returns a Promise object, as shown below:
import FxUI from 'fxui-mobile';
FxUI.objectApi.fetch_data("object_lt6yx__c","64881f13e50a930001a5b941").then((res) => {
console.log('fetch_data success callback', res)
}).catch((err) => {
console.log('fetch_data failure callback', err)
})Notes
Some field types also use keys with suffixes such as __r or __l to store additional auxiliary information. For example, the owner field below has owner, owner__r, and owner__l.
{
field_2l23J__c: null,
field_2t8Oo__c: null,
field_59N45__c: [],
field_AJvu7__c: null,
field_F99W2__c: null,
field_Gakhc__c: null,
field_Lnl21__c: null,
field_cy6J2__c: null,
owner: ["1056"],
owner__l: [{
id: "1056",
tenantId: "590063",
name: "Sample User",
picAddr: "",
email: "",
nickname: "Sample User",
phone: "",
...
}],
owner__r: {
picAddr: "",
description: "",
dept: "1016",
supervisorId: null,
title: null,
...
},
owner_department: "PRM Test",
owner_department_id: "1016",
package: "CRM",
partner_id: null,
record_type: "default__c",
relevant_team: [{
teamMemberEmployee: ["1056"],
teamMemberRole: "1",
teamMemberPermissionType: "2"
}],
relevant_team__r: "Sample User",
tenant_id: "590063",
version: "3",
_id: "5ee88fb29158b400017c31d8"
}