# FxUI.objectApi.fetch_data(apiName, dataId)

This method allows you to obtain a piece of business object data.

# parameter

parameter illustrate type Optional value Default value
apiName Business object apiName (required) string
dataId Business Object Data ID (required) string

# usage

The method returns a Promise Object,an example of which is as follows:

FxUI.objectApi.fetch_data('AccountObj', '5ee83f974ddcee0001faa57d').then((data) => {
    console.log(data);
    // todo what you want
}).catch(err => {
    console.log(err);
})

# Data data structure

Key is the api_name of the field, and value is the value corresponding to the field. Note that some types of fields also have__ R or__ L and other suffixes to store other auxiliary information. For example, the following owner field contains owner in addition to owner__ r、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: "阿隆索离开的减肥啦",
        picAddr: "",
        email: "",
        nickname: "阿隆索离开的减肥啦",
        phone: "",
        ...
    }],
    owner__r: {
        picAddr: "",
        description: "",
        dept: "1016",
        supervisorId: null,
        title: null,
        ...
    },
    owner_department: "PRM测试",
    owner_department_id: "1016",
    package: "CRM",
    partner_id: null,
    record_type: "default__c",
    relevant_team: [{
        teamMemberEmployee: ["1056"],
        teamMemberRole: "1",
        teamMemberPermissionType: "2"
    }],
    relevant_team__r: "阿隆索离开的减肥啦",
    tenant_id: "590063",
    version: "3",
    _id: "5ee88fb29158b400017c31d8"
}
lastUpdate: 10/21/2022, 5:22:27 PM