- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 06:47 AM
Hello Experts,
In incident form under related list there is one tab called incident_task.
Now my requirement is
If incident state is closed then how to hide "new" button for incident_task tab?
example.
incident state is closed hide "new" button.
incident state is not = closed "new" button need to visible.
How to achieve this..?
note : this is not for admin role.
Best Regards,
Raj.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 07:30 AM
I see,
try below:
if(parent.state=='7'){
answer = true;
}else{
answer=false;
}
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 07:01 AM
Hi,
You can use List Control on related list.
On the Incident Task Related List,
Right Click on one of the headers and select Configure > List Control.
On the List Control Form add the Omit new condition Field (You may need to add this field by configuring form layout of List control form)
Add script in this field like below:
answer= parent.state!='7'; // value of close state is 7
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 07:15 AM
Hello @Anil Lande
tested with this condition
answer=parent.state!='7';
here the problem is new button is visible for closed incidents .but remaining states new button is not visible ...
means it is working opposite.
best regards,
Raj.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 07:22 AM
Please change it to :
answer=parent.state=='7';
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 07:26 AM
Hello @Anil Lande
tested with this answer=parent.state=='7'; as well .
but new button is not visible in all the states
Best regrards,
Raj.