Home Analyst Portal
Options

Stuck.. Update "Impact" Drop Down on Incident Form via Custom.js

Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭
edited October 2016 in Analyst Portal

Hi All,

We have a special "VIP" impact level. Whenever the affected user happens to be a VIP user we want to auto-update the impact to be "VIP", so that the SLA's are changed accordingly. I know its possible to do this via an "Incident Event Workflow" in Service Manager, but I would prefer to do it on the fly in the portal if possible.

Unfortunately, I cant figure out how to update the Impact kendo drop down list.

Whatever I try, it never seems to update. Any assistance with this would be much appreciated.
Here is what I have so far (which does not work)

/*<br>&nbsp;For VIP Users, Updates Status of Call to "VIP"<br>*/<br>function updateStatusToVIP(userPickerId, userPickerObject) {&nbsp;<br>&nbsp;if (pageForm.viewModel.Impact.Name != "VIP") {<br>&nbsp;&nbsp;pageForm.viewModel.Impact.set("Name", "VIP");<br>&nbsp;&nbsp;pageForm.viewModel.Impact.set("Id", "05f71590-efec-c7ab-5940-68317db0b036");<br>&nbsp;&nbsp;alertify.log("<b>!! VIP User Detected !!</b><br><i>Impact</i> automatically updated to <b>VIP</b>.<br>")<br>&nbsp;}<br>}


Best Answers

Answers

  • Options
    Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭

    Thanks Geoff!

    Much appreciated. I will have a look at this later today and give it a go.

    Regards,

    Adrian

  • Options
    Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭

    Thanks Roland,

    I will give this a go.

    Cheers,

    Adrian

  • Options
    Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭

    This did the trick!

    Thanks Roland.

    So my final code was as follows:


      enumVIP = "05f71590-efec-c7ab-5940-68317db0b036"
      
      $('[data-role=Impact]').each(function (index){
       $(this).data('kendoExtDropDownTreeViewV3')._dropdown.value(enumVIP)   
      });
      pageForm.viewModel.Impact.set("Name", "VIP");
      pageForm.viewModel.Impact.set("Id", enumVIP);

Sign In or Register to comment.