Home General Discussion

Creating Custom Tasks

Jarrett_FaulkJarrett_Faulk Customer IT Monkey ✭
Hello All,

I'm having some issues with creating custom tasks on incident requests.  I've following kb article here: https://support.cireson.com/KnowledgeBase/View/52#/. When I launch my test portal and create a new incident the new task never shows up.  I've cleared the custom.js file of all other code but this isn't working for me.

here is my code which is taken directly from the KB article.

thanks in advance.

/*test scripts */
app.custom.formTasks.add('Incident', "Resolve", function (formObj, viewModel) { $.when(kendo.ui.ExtYesNoDialog.show({ title: "Change Status", message: "Are you sure you want to change the status to resolved?" })).done(function (response) { if (response.button === "yes") { set new status viewModel.Status.set("Name", "Resolved"); viewModel.Status.set("Id", "b6679968-e84e-96fa-1fec-8cd4ab39c3de"); } }); return; });

Best Answer


  • Sharon_SpearsSharon_Spears Customer Advanced IT Monkey ✭✭✭
    I use the above example in the task menu, works, but I'm wanting a similar function as a button.

    The button example on the Cireson page - https://support.cireson.com/KnowledgeBase/View/51#/ doesn't work (as an example).  Or I can't get it to work.

    How can I get the outcome above (change status)  to work with a button within a customised incident form.
  • Geoff_RossGeoff_Ross Cireson Consultant Super IT Monkey ✭✭✭✭✭
    Hi @Sharon_Spears

    Yes, this is possible, what trouble did you have following the guide in the article?

  • Sharon_SpearsSharon_Spears Customer Advanced IT Monkey ✭✭✭
    Hi @Geoff_Ross
    Thank you for replying, appreciate it.
    I've followed the guide, created a customised form for a specific AD group,  set the assign group to the form.  Form is visible only to that group.

    As a test from the KB article, I've  add the button code to the form

    app.custom.formTasks.add('Incident', null, function(formObj, viewModel){   viewModel.set("Demo", function() {       alert("hi"); }); });

    added to the custom.js file: ( use script loader method)

    {DataType: "Button", PropertyDisplayName: "Click Me!", ButtonType: "default", Action:"Demo"}

    Updated the cireson cache (several times) doesn't work.

    In a real scenario, I wanted to achieve the same as this, but with a button within the form.  I wasn't sure how to call the action from the button code-- what the action name was or if this code was right.

    I understand what the code is doing, but I don't have the knowledge to re-write the code to work with a button.

    app.custom.formTasks.add('Incident', "Resolve", function (formObj, viewModel) { 
    Thanks, any help would be appreciated.

Sign In or Register to comment.