Hi,
Does anyone know if there is an SDK documentation regarding the SCAN button in the SmartUI.
We would like to call this functionality from an external system.
Thanks
The scanning command has the signature "escan-scan". You can try executing it in your scenario and see, how it fits.
csui.onReady2([ 'csui/lib/backbone', 'csui/models/node/node.model', 'csui/dialogs/modal.alert/modal.alert', 'csui/utils/base', 'csui/utils/commands', 'csui/utils/contexts/page/page.context', 'csui/utils/contexts/factories/connector'], function (Backbone, NodeModel, ModalAlert, base, commands, PageContext, ConnectorFactory) { var context = new PageContext(), connector = context.getObject(ConnectorFactory), container = new NodeModel({id: 2000}, {connector: connector}), scanCommand = commands.get('escan-scan'); container.fetch() .done(scanToContainer) .fail(function (request) { var error = new base.Error(request); ModalAlert.showError(error.message, 'Loading container information failed'); }); function scanToContainer() { var status = { nodes: new Backbone.Collection([container]), container: container, context: context }; if (scanCommand && scanCommand.enabled(status)) { scanCommand.execute(status) .fail(function (error) { ModalAlert.showError(error.message, 'Scanning document failed'); }); } else { ModalAlert.showWarning('Scanning document to the container is not permitted.', 'Warning'); } }});