This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Checks if a reference to the referenced item exists in the specified field of the referring item.
The isReferenced()
method returns a Promise that resolves to true if the referring item contains a reference to the referenced item in the specified field. The Promise is rejected if the current user does not have read permissions for the collection.
Note: The isReferenced()
method is not supported for single-item collections.
ID of the collection containing the referring item.
Field to check for a reference to the item that might be referenced.
Referring item.
Item that might be referenced.
Options for checking whether a field contains a reference to an item.
This example checks if the item in the Movies collection with the ID 00001 has a reference in its Actors field that refers to an item with the ID 12345
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.