function getFieldApiName(value) {
    if (typeof value === 'string') {
        return value;
    } else if (
        value &&
        typeof value.objectApiName === 'string' &&
        typeof value.fieldApiName === 'string'
    ) {
        return value.objectApiName + '.' + value.fieldApiName;
    }
    throw new TypeError('Value is not a string or FieldId.');
}
Returns the field API name, qualified with an object name if possible.
@param value The value from which to get the qualified field API name.
@return The qualified field API name.