The CreatorCon Call for Content is officially open! Get started here.

I need to manually create sctask for a certain catalog item

olufsen
Kilo Sage

Hi, I have client that want the related list button 'New' to show if catalog item = test catalog so that itil users can manually add sctask to that item but not with other catalog items.

 

I have already added the role itil to the ACL so it now showing to all ITIL users.

 

I have tried adding the following condition to the list control but it is not working. Anyone can help me please?

URL: /now/nav/ui/classic/params/target/sys_ui_list_control.do%3Fsys_id%3D98735e020a0006413e6c4f7c967da246%26sysparm_view%3D%26sysparm_domain%3Dnull%26sysparm_domain_scope%3Dnull

 

olufsen_0-1698718929435.png

 

2 ACCEPTED SOLUTIONS

Tai Vu
Kilo Patron
Kilo Patron

Hi @olufsen 

Let's try the below adjustment.

answer = parent.getValue('cat_item') !== 'e56a7ffe41011300964ff05369414ebd'; //replace your catalog item sys_id

 

Let me know if it works for you.

 

Cheers,

Tai Vu

View solution in original post

Hi @olufsen 

It seems this is a known issue. Ref: KB0787199

"This is expected behaviour in currently supported releases. Workspace lists do not support the list control, the buttons are driven by declarative UI Actions."

 

So you can consider to redefine Action Assignments [sys_declarative_action_assignment].

1. Add the sc_task table to the Exclusions list of the below Action Assignment.

URL: https://<instance_name>/sys_declarative_action_assignment.do?sysparm_nostack=true&sys_id=ebae1eb773c...

2. Insert the new button specifically for the table sc_task.

Sample below.

TaiVu_0-1698727435016.png

 

 

Cheers,

Tai Vu

 

View solution in original post

7 REPLIES 7

Danish Bhairag2
Tera Sage

Hi @olufsen ,

 

3rd line is wrong. U need to provide proper condition.for eg just check on which table u are configuring list control.If it's on task table then code should look something like

 

if(current.request_item.cat_item == "enter sys I'd of the required catalog item"){

answer = false;

}

 

Just try the above logic of it's on task table.

 

Thanks,

Danish

 

Tai Vu
Kilo Patron
Kilo Patron

Hi @olufsen 

Let's try the below adjustment.

answer = parent.getValue('cat_item') !== 'e56a7ffe41011300964ff05369414ebd'; //replace your catalog item sys_id

 

Let me know if it works for you.

 

Cheers,

Tai Vu

nope, it didn't worked.

Hi @olufsen 

It works quite well per my check. Which parent table you're currently on?

TaiVu_0-1698724339496.png

 

Cheers,

Tai Vu