Hide new button in incident_task table if incident state is closed.

raj149
Giga Guru

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.

1 ACCEPTED SOLUTION

I see,

try below:

if(parent.state=='7'){
answer = true;
}else{
answer=false;
}
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

5 REPLIES 5

Anil Lande
Kilo Patron

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
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

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.

Please change it to :

 

answer=parent.state=='7';

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

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.