replaceDataItemReferences( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Replaces references in a specified field of a specified data item.

This function replaces the existing reference or references contained in the field specified in options.referringItemFieldName within the data item specified in options.referringItemId. The function removes existing references and in their place it adds references to the items specified in options.newReferencedItemIds.

Note: If you pass an empty array in options.newReferencedItemIds, all existing references are removed.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Write Data Items
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsReplaceDataItemReferencesOptions

Options for replacing references.

Returns
Return Type:Promise<ReplaceDataItemReferencesResponse>
Did this help?