- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2024 11:57 AM
Hello,
In a cmdb_ci record, I want the user to be able to create a task. I added a UI Action inspired by the existing "Create Incident" UI Action (now/nav/ui/classic/params/target/sys_ui_action.do%3Fsys_id%3D6071fa390b2322001604628393673ac9%26sysparm_record_target%3Dsys_ui_action%26sysparm_record_row%3D4%26sysparm_record_rows%3D2761%26sysparm_record_list%3DORDERBYDESCsys_updated_on)
Here is my script:
var url = new GlideURL("task.do");
url.set("sys_id" , "-1");
url.set("sysparm_query" , "cmdb_ci=" + current.sys_id);
action.setRedirectURL(url.toString()+"");
Here is the resulting url for the new tabs:
now/sow/record/u_cmdb_ci_derogation_securite_information/f822b6b41bbe0610d24acaee034bcb46/params/selected-tab-index/0/sub/record/~~undefined~~/-1_uid_36/params/query/cmdb_ci%3Df822b6b41bbe0610d24acaee034bcb46/extra-params/query%2Fcmdb_ci%3Df822b6b41bbe0610d24acaee034bcb46
We can see that there's ~~undefined~~ in the url.
I tried replacing first line in the script with
var url = new GlideURL("sc_task.do");
and it opens a new catalog task as expected.
Anyone has an explanation why task.do does not work?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2024 07:40 AM
Hello Martin,
The Task table serves as the base class for essential ITSM applications like Incident, Problem, and Change Management. It does not have a ticket type of its own. Essentially, the Task table contains all tickets from its child tables. This means that tasks are not directly created on the task table but rather on its child tables.
Therefore, when creating a ticket via any UI action, you need to specify the table name, such as sc_task, incident, and so on, where you want the ticket to be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2024 07:40 AM
Hello Martin,
The Task table serves as the base class for essential ITSM applications like Incident, Problem, and Change Management. It does not have a ticket type of its own. Essentially, the Task table contains all tickets from its child tables. This means that tasks are not directly created on the task table but rather on its child tables.
Therefore, when creating a ticket via any UI action, you need to specify the table name, such as sc_task, incident, and so on, where you want the ticket to be created.