List Control

sunny13
Giga Expert

Hi All,

I'm trying to hide "Edit" in the change task related list by using advance script in list control   for people without change_manager role and also there is an OR condition with respect to state.

Please review my code,

var answer;

if(gs.hasRole == "change_manager" ) ||   (parent.state=='3' || parent.state=='4' || parent.state=='-2' || parent.state=='-13' || parent.state=='-14' || parent.state=='2' || !parent.active;)

{

  answer=false;

}

else{

  answer=true;

}

But what happens is the EDIT button is not visible to anyone with any role except ADMIN i even revoked all changes but the EDIT button is missing from the related list.

But NEW button is visible to Users

find_real_file.png

Can someone help me debug this issue.

1 ACCEPTED SOLUTION

The change_task table should be editable to the user. Make sure the MPI


Change Manager has write access to the table.


View solution in original post

31 REPLIES 31

Chuck Tomasi
Tera Patron

Hi Sanjin,



I would consider using a CREATE ACL on the related list records.



Just a quick question... why are you trying to use an Edit button the change_task related list? Edit is used to manage many-to-many relationships. Change tasks are typically assigned to one parent change. I wouldn't think this is a case where the same change task can be applied to multiple changes.


Hi Chuck,



Yes , The customer is looking for this feature to map a Change task from one CR to another CR , i don't think they will map a change task to multiple CR's.



it is a business requirement.



Let me try by creating a ACL.


Thank you for the clarification Sanjin. If you have an Edit button, someone is going to get confused. I recommend they change the value of the "Change request" reference field on the change task to point to the correct parent record instead. This eliminates the possibility of confusion.


Chuck,



I understand thanks i will let parent field in the ctask editable for change_managers so that they can make the appropriate change.