execute code on Closed Incidents
<div>app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {</div><div> //bind a function to the form ready event </div><div> formObj.boundReady(function () {</div><div> <span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span></div><div>//Do stuff<br><br></div><div><br></div><div>}); </div>
But this does not seem to work on closed Incidents (also tried a setTimeout function). Is this intended or a bug ? I can probably make a workaround, but it would be much better to use the supported way.
Best Answers
-
Geoff_Ross Cireson Consultant O.G.Hi Morten,
The task loader does not run on closed incidetns so if you need code to run on all IRs, Active or Closed, you can use the following.$(document).ready(function (){ if(window.location.href.indexOf("/Incident/Edit/") > -1){ //Do stuff } });
Geoff5 -
Morten_Meisler Premier Partner Advanced IT Monkey ✭✭✭Thanks Geoff. Hehe the if-statement matches exactly mine, only I use !== -1.
ty.
Morten6
Answers
The task loader does not run on closed incidetns so if you need code to run on all IRs, Active or Closed, you can use the following.
Geoff
ty.
Morten