Lists SDK

JS methods for working with SDK lists

This section describes the functions and workflow for working with the SDK lists

The system has the ability to replace the standard list item editing card. To do this, you must set the connection area of the widget "catalogs" in manifest.json, and then specify the directory id in which the custom card will be used instead of the usual one

In order to specify the directory id, it is necessary to call the special widget method setSdkCatalogId, passing the directory id to the argument until the widget's settings are saved. You can do this, for example, in the callback onSave

Example:

  1. onSave: _.bind(function () {
  2.           this.setSdkCatalogId(this.params.catalog_id);
  3.           return true;
  4. }, self),

After setting up the settings, when you try to edit the directory element, the callback of the widget loadCatalogElement will be called. In this case, the standard edit card of the list item will not open.

  1. loadCatalogElement: function (catalog_element) {
  2.           console.log('Editing a catalog item #' + catalog_element.id);
  3. },