- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2025 09:04 AM - edited 07-26-2025 09:22 AM
Hi Sir,
At state is open, work in progress and pending state 'itil' users able to add and create the records in the related list..
But when the state is resolved and Closed 'Edit' and 'New' Buttons should be hide to the 'itil' users.
only it needs to be add and create access to 'Admin's.
Please suggest . In the List control what role's I have to give and what is script I have to written.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2025 06:19 PM - edited 07-26-2025 06:20 PM
Hi @vennugopikr
Try the below script under "Omit New button condition" & "Omit Edit button condition".
if(parent.state == 6 || parent.state ==7){
if(gs.getUser().hasRole('admin')){
answer = false; // Show new button to the admin users
}else{
answer= true;
}
}else{
answer= false;
}
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2025 06:19 PM - edited 07-26-2025 06:20 PM
Hi @vennugopikr
Try the below script under "Omit New button condition" & "Omit Edit button condition".
if(parent.state == 6 || parent.state ==7){
if(gs.getUser().hasRole('admin')){
answer = false; // Show new button to the admin users
}else{
answer= true;
}
}else{
answer= false;
}
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2025 08:19 PM
Thank Shiva, it working.
Can you please help me where I have to find this 'Add' button. This is not there in List control.
I need to hide this button also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2025 08:21 PM
Thanks, it is working.
Can you please help me to where I have to find this 'Add' button. It is not there in List control. I need to hide this button also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2025 08:29 PM
Hi @J Siva , Thanks It is working.
Can you please help me where i have to find this 'Add' button, it is not there in List Control,
Can you please help me where i have to find and restrict the button.