Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Remove New Button on Change Tasks when parent is approved

EricG2
Giga Guru

Not sure if this got posted or not, so sorry if I'm repeating myself.

 

I'm attempting to remove the New Button from the Change Request's related list Change Tasks when the change ticket has been approved.

 

I've read many of the posts about updating the "List Control" item, and have done this.

List control 1.png  

List control 2.png

if (parent.state.toString() == '-5' || parent.state.toString() == '-4'  || change_request.state.toString() == '-3' ) 
   answer = true;
else
	answer = false;

gs.info("The answer is "+answer+" for parent state of "+parent.state)

 I've checked the logs to validate that the script is catching the right values and have validated that when the change request is in New, Assess, or Authorize the value being returned is True.

Conversely, if the state is Implement, Scheduled or Closed, the value logged is false.

 

But still the banner NEW button appears on the related list no matter the Change's state.

 

I've also attempted to update the Create ACL

acl 1.png

acl 2.png

 This ends up preventing any user from creating a Change Task at any state.

 

I need help understanding why the New button remains available.

 

1 ACCEPTED SOLUTION

EricG2
Giga Guru

I found my issue.

 

Someone had removed the Conditions on the GLOBAL New UI Action for Related Lists.

Once I added this back to the UI Action, the suggested List Control script worked.

 

Thank You all for you pointers and process suggestions.

View solution in original post

5 REPLIES 5

EricG2
Giga Guru

I found my issue.

 

Someone had removed the Conditions on the GLOBAL New UI Action for Related Lists.

Once I added this back to the UI Action, the suggested List Control script worked.

 

Thank You all for you pointers and process suggestions.