queryReferencedDataItems( )


Deprecated

This method is deprecated and was replaced with queryReferenced.

Retrieves the full items referenced in the specified field of an item.

Reference and multi-reference fields refer to items in different collections. Use this function to retrieve the full details of the referenced items themselves.

For example, suppose you have a Movies collection with an Actors field that contains references to items in a People collection. Querying the Movies collection using queryReferencedDataItems() returns the relevant People items referenced in the Actors field of the specified Movie item. This gives you information from the People collection about each of the actors in the specified movie.

Note: When calling queryReferencedDataItems() following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set options.consistentRead to true.

Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Read Data Items
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryReferencedDataItemsOptions

Options for querying referenced data items.

Returns
Return Type:Promise<QueryReferencedDataItemsResponse>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?