Skip to content

core.customizeImporters

Allows the addition of new, custom importers. The importers which will be refered here, must have been previously configured in recordm-importer/name_of_custom_importer. This customization simply adds one or more custom import buttons that link up to one of those previously configured configurations.

Usage:

javascript
core.customizeImporters(<definition-name>, [
		{
				"label": "<importer-job-id>",
				"name": "<importer-menu-label>",
				"message": "<description-for-importer>"
		},
		...
]);

Arguments:

ArgumentDescriptionRequired
definition-nameRefers to the name of the specific definition to which you want to apply the customization.YES
custom-importer-detailsList of dictionary objects with the information that refers to a previously configured custom importer.YES

Custom Importer Dictionary:

ArgumentDescription
labelName of the importer that shows when selecting "Import Records".
nameThe name of the previously configured importer. Should match a folder in /recordm-importer/name/.
messageA message that shows in the import window that we can use to convey any information we deem important.

Examples:

In this example we using this customization to add two custom importers to our Tickets. In addition to the standard import, we are adding one named "Historic" - for old Tickets from a previous or different system - and one named "Ongoing" - for ongoing tickets that for some reason are stored in an Excel sheet and need to be imported.

javascript

cob.custom.customize.push(function (core, utils, ui) {

  const DEFINITION = "Tickets";

  core.customizeImporters(DEFINITION, [
    {
      "label": "Historic",
      "name": "tickets-historic",
      "message": "Historic data for tickets."
    },
    {
      "label": "Ongoing",
      "name": "tickets-ongoing",
      "message": "Ongoing tickets from external project. "
    }
  ]);
});

For each of these we provide their label, which as can be seen in the screenshot is the name that will be displayed for the button. We also provide the "name", which is the importer menu label, along with a message that will accompany the rest of the details of the new importer.

The following screenshots show the end result:

screenshot_2024-02-26_at_14.51.01_1

screenshot_2024-02-26_at_14.56.34_1