Once the state is closed the time card related list new button will be hidden in incident form

mania
Tera Contributor

Hi,

 

Once the state is closed the time card related list new button will be hidden in incident form.

Can anyone please help on this, It will be usefull.

mania_0-1720098947354.png

Thanks!

5 REPLIES 5

Mohan raj
Mega Sage

Hi @mania,

 

 

To hide the "New" button on the related list:

  1. Right-click on the related list and select Configure > List Control.
  2. The List Control form will open. Right-click on the form header and select Configure > Form Layout.
  3. Move the "Omit new condition" field to the "Available" section.
  4. Write the condition script to hide the "New" button based on your specific conditions.
if(current.state == '7'){ //when state is closed
	answer = false;
}else {
	answer = true;
}

 

If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.

mania
Tera Contributor

@Mohan raj 

It is hidden normally  when state is new but i want to state is closed and also i have given backed value of closed is correclty so can you suggest.

Thanks!

Write condition on Omit new condition field to hide the new button

if(current.state == '7'){
	answer = false;
}else {
	answer = true;
}

mania
Tera Contributor

@Mohan raj 

Its not working.

Thanks!