Manually Create Catalog Tasks

Sam Ogden
Tera Guru

We have set up multiple Catalog items which creates items on the sc_req_item table and create tasks on the sc_task table and send these to the correct groups based on the workflows.

In some instances users may need to manually create additional tasks.   I need help in giving users access to the 'New' button without giving them access to all the things that the catalog_admin role gives them.

Any help will be greatly appreciated.

Thanks

1 ACCEPTED SOLUTION

Hi Sam,



The create ACL might be missing for ITIL users, Can you please add it? You can take a copy of OOB write ACL and change it to create on sc_task table.



Create.jpg




Thanks


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


View solution in original post

11 REPLIES 11

nayanawadhiya1
Kilo Sage

Hey Sam,



For that you can Use List Control. You can provide NEW Button as per your requirement.


Refer this -


Configuring Lists - ServiceNow Wiki


Advanced list control with scripts


shloke04
Kilo Patron

Hi,



You can configure a new UI Action on Requested Item Page say as "Create Catalog Task", visibility of this UI action can be controlled as per your requirement by defining it in the Condition field of the UI Action. Below code should be useful:



Script:



if('Your Condition')


  {


  var task = new GlideRecord("sc_task");


  task.initialize();


  task.request_item = current.sys_id;


  task.assignment_group = 'Sys id of the Assignment Group';


  var sctask = task.insert();


  var url = "/sc_task.do?sys_id=" + sctask;


  action.setRedirectURL(url);


  }



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Alikutty A
Tera Sage

Hi,



You should be updating List control for the catalog task related list.



list.jpg


The omit new condition script should be updated according to your required conditions to created manual tasks. What are your conditions?



It has a default OOB script



answer = !parent.active;     //Parent is the requested item and by default the new button wont be visible for closed requested items.





Thanks


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


Hi Alikutty,



I've just looked on the sc_task.request_item related list list control and the omit new button is not ticked.   The Omit new condition is set to the answer = !parent.active;


Can it be set that people can have this button without any conditions or do some conditions have to be put in place?


find_real_file.png