0

URLを介してrecordNameを2番目のページに渡すWebサイトで作業しています。recordName {data} の正しい解析が表示され、次のように filterBy を使用してクエリに使用しようとします。

        var query = { recordType: 'Events', 
            filterBy: [{
                fieldName: 'recordName',
                comparator: 'EQUALS',
                fieldValue: {value: [{data}]
                }
            }]
         };

         return publicDB.performQuery(query).then(function (response) {
            if(response.hasErrors) {
                console.error(response.errors[0]);
                return;
            }

            var records = response.records;
            var numberOfRecords = records.length;
            if (numberOfRecords === 0) {
                console.error('No matching items');
                return;
            }

            self.events(records);

この方法と、fieldName を recordName として指定しようとするその他の試みはすべて、同じエラー メッセージを生成します。

    ckErrorCode:"NOT_FOUND"
    extensionErrorCode:undefined
    reason:"ObjectNotFoundException: no such field recordName"
    recordName:undefined
    redirectURL:undefined
    retryAfter:undefined
    serverErrorCode:"NOT_FOUND"
    subscriptionID:undefined
    uuid:"7ff93475-a22c-4ae2-859f-4a219e0253b1"
    zoneID:undefined
    message:"ObjectNotFoundException: no such field recordName"

これは非常に奇妙に思えますが、おそらく、簡単に修正できる明らかなものです。

任意の提案をいただければ幸いです。

4

1 に答える 1

3

recordNameはシステム フィールドであり、以下はそれらのクエリ方法です。

var query = {
    recordType: 'Events',
    filterBy: [{
        comparator: 'EQUALS',
        systemFieldName: 'recordName',
        fieldValue: {
            value: 'the-name-of-the-record'
        }
    }]
}

既知のバグにより、次のラッパーを追加する必要がありますrecordName

var query = {
    recordType: 'Events,
    filterBy: [{
        comparator: 'EQUALS',
        systemFieldName: 'recordName',
        fieldValue: {
            value: {
                recordName: 'the-name-of-the-record'
            }
        }
    }]
}
于 2016-01-26T01:05:23.493 に答える