"Comment cannot be viewed by technicians until work begins on the Requested Item"

adamrauh
Kilo Expert

I'm getting the above exception whenever I try to use my checkout cart:

 

comment.tiff

 

"Comment cannot be viewed by technicians until work begins on the Requested Item"

 

I'm using a default workflow, so i'm not sure why this is showing and I'd prefer it not to so as not so spook the users.

 

Any ideas?

3 REPLIES 3

jesjuar
Tera Guru

Hi Adam,



That UI message is showed by a Business Rule on the sc_req_item called "sc_req_item comment events":


gs.eventQueue("sc_req_item.commented", current, gs.getUserID(), gs.getUserName());


queueAssigneeEvent();



function queueAssigneeEvent() {


  var assigneeArr = [];


  var assignGroupArr = [];


  //Query for non-pending sc_task records


  var catTsk = new GlideRecord('sc_task');


  catTsk.addQuery('request_item', current.sys_id);


  catTsk.addQuery('state', '!=', -5);


  catTsk.query();


  if (!catTsk.hasNext()) {


          gs.addInfoMessage(gs.getMessage('Comment cannot be viewed by technicians until work begins on the Requested Item'));


          return;


  }


//...




You can just comment the line 13 or deactivate the BR if you do not need it.



Hope this helps!



Jesús Juárez


Silverstorm Solutions


Please forgive me for the dumb question, but where would I actually comment this out?


Would I just comment out line 12 & 13 ??



gs.eventQueue("sc_req_item.commented", current, gs.getUserID(), gs.getUserName());
queueAssigneeEvent();


function queueAssigneeEvent() {
    var assigneeArr = [];
    var assignGroupArr = [];
    //Query for non-pending sc_task records
    var catTsk = new GlideRecord('sc_task');
    catTsk.addQuery('request_item', current.sys_id);
    catTsk.addQuery('state', '!=', -5);
    catTsk.query();
    //if (!catTsk.hasNext()) {
          //gs.addInfoMessage(gs.getMessage('Comment cannot be viewed by technicians until work begins on the Requested Item'));
          return;
    }


Mike,



Comment line 13 only, the one that starts with gs.addInfoMessage()'



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response