removeDataItemReferences( )


Important:


Removes one or more item references from a referring field of the specified item.

Method Declaration
Copy
function removeDataItemReferences(
  payload: RemoveDataItemReferencesEnvelope,
): RemoveDataItemReferencesResponse | Promise<RemoveDataItemReferencesResponse>;
Method Parameters
payloadRemoveDataItemReferencesEnvelope
Returns
Return Type:RemoveDataItemReferencesResponse | Promise<RemoveDataItemReferencesResponse>
Example of a `results` return value
JavaScript
import { externalDatabase } from "@wix/data/service-plugins"; externalDatabase.provideHandlers({ removeDataItemReferences: async (payload) => { const { request, metadata } = payload; // Use the `request` and `metadata` received from Wix and // apply custom logic. return { // Return your response exactly as documented to integrate with Wix. // Return value example: results: [ { reference: { referringItemId: "c285e77c-a86b-4361-a55f-c6b934d70187", referencedItemId: "faa17edb-2d88-488d-8e95-24b9364c3284", }, }, ], }; }, });
Did this help?