Home Analyst Portal

Custom Task to assign SR to specific AD Group

Kevin_BaierKevin_Baier Customer IT Monkey ✭
edited February 2017 in Analyst Portal

Hey Guys

I Need a custom Task, to assign the SR to a specific AD Group.

Does anybody of you know how to call viewModel.AssignedWorkItem.set() ?

Which Parameters i Need to add?

Please see the full Code of my Task.

//New Task => SR assign Request HRLMS
app.custom.formTasks.add('ServiceRequest', "set completed", function (formObj, viewModel) {
    $.when(kendo.ui.ExtYesNoDialog.show({
        title: "Assign Service Request to HRLMS",
        message: "Are you sure you want to assign this Service Request to HRLMS?"
    })
    ).done(function (response) {
        if (response.button === "yes") {
            //set new assign
            AssignedWorkItem.set() //Here is the Code missing

            formObj.save(function (data) {
                //save success message
                app.lib.message.add(localization.ChangesApplied, "success");

                //reload page
                location.href = "/ServiceRequest/Edit/" + viewModel.Id + "/";
            }, function (exceptionMessage) {
                //generic error message
                app.lib.message.add(localization.PleaseCorrectErrors, "danger");
                app.lib.message.show();
            });
 if(history.length > 1) { history.back() } else { window.location.href = 'https://portal.contoso.com/View/cca5abda-6803-4833-accd-d59a43e2d2cf' }
        }
    });
    return;
});

Best Answer

Answers

Sign In or Register to comment.