Home Asset Management

Asset Management Portal Tasks

Alex_MarshAlex_Marsh Premier Partner Advanced IT Monkey ✭✭✭
How easy is it to add some tasks to the asset management on the portal? A delete item task would be quite useful for asset managers to be able to remove items without needing the console

Answers

  • Alex_MarshAlex_Marsh Premier Partner Advanced IT Monkey ✭✭✭
    edited March 2017
    I've managed to sort this now. Not helped by 

    var tasks = app.custom.formTasks.get(pageForm.type);
        if (_.isArray(tasks)) {
            $.each(tasks, function (i, task) {
                pageForm.taskTemplate.tasks.push({ Task: "custom", Type: pageForm.type, Label: task.label, Access: true, Configs: { func: task.func } })
            });
        }

    being missing from the ammain.js (can we put this in a future release so we can have custom asset management tasks).

    The JS to set an object (catalog item in this case) to pending delete is

    app.custom.formTasks.add('CatalogItem', "Mark for Deletion", function (formObj, viewModel) { $.when(kendo.ui.ExtYesNoDialog.show({ title: "Delete Item", message: "Are you sure you want to delete the catalog item?" })).done(function (response) { if (response.button === "yes") { viewModel.ObjectStatus.set("Id", "47101e64-237f-12c8-e3f5-ec5a665412fb"); } }); return; });
Sign In or Register to comment.