Skip to content

Bulk Create Listener

A registered listener will receive a real-time request for all bulkCreate API requests.

const eventHandler = Backendless.Data.of( 'TABLE-NAME' ).rt();

const callback = ({ objectIds }) => console.log( objectIds )
const onError = ({ message, code }) => console.log( 'Error:', message, 'Error Code:', code )

eventHandler.addBulkCreateListener( callback, onError );
const eventHandler = Backendless.Data.of( TABLENAMECLASS ).rt();

const callback = ({ objectIds }) => console.log( objectIds )
const onError = ({ message, code }) => console.log( 'Error:', message, 'Error Code:', code )

eventHandler.addBulkCreateListener( callback, onError );

Return value

The callback delivers a collection of objectId values for the objects saved in the database.

Removing listeners

The method removes all registered listeners for the bulk update event:

eventHandler.removeBulkCreateListeners();

Removing a specific listener

This method removes a listener identified by the callback object:

eventHandler.removeBulkCreateListener( callbackObject );