removeDataItemReferences( )


Important:


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

Method Declaration
Copy
Method Parameters
payloadRemoveDataItemReferencesEnvelope
Returns
Return Type:RemoveDataItemReferencesResponse | Promise<RemoveDataItemReferencesResponse>
Example of a `results` return value
JavaScript
Did this help?

removeDataItems( )


Important:


Removes one or more items from a collection. The response object must contain the removed item.

Method Declaration
Copy
function removeDataItems(
  payload: RemoveDataItemsEnvelope,
): RemoveDataItemsResponse | Promise<RemoveDataItemsResponse>;
Method Parameters
payloadRemoveDataItemsEnvelope
Returns
Return Type:RemoveDataItemsResponse | Promise<RemoveDataItemsResponse>
Example of a `results` return value
JavaScript
import { externalDatabase } from "@wix/data/service-plugins"; externalDatabase.provideHandlers({ removeDataItems: 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: [ { item: { name: "New York", _id: "c285e77c-a86b-4361-a55f-c6b934d70187", _owner: "facda016-24ef-4909-a90e-70687f17f658", _createdDate: { $date: "2021-01-02T03:04:05Z", }, _updatedDate: { $date: "2021-04-05T06:07:08Z", }, }, }, ], }; }, });
Did this help?