How to editable particular field based on Assigned to or assign?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:12 AM
How to editable particular field based on Assigned to or assign?
Scenario:
1. Incident assign to particular user .
2. Assign to User have only Editable Short_description field, Remaining users have read only .
Thanks
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:25 AM
Hi @Ramanjaneyuv ,
You can use on load client script to check if currently logged in user is present in assigned to or not and based on that you can make fields read only or editable -
If my reply helped with your issue please mark helpful 👍 and correct ✔️ if your issue is resolved.
By doing so you help other community members find resolved questions which may relate to an issue they're having
Thanks,
Astik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:25 AM
Hi @Ramanjaneyuv ,
You can achieve this by write ACL on incident.assigned_to
Script:
answer = false;
if (gs.getUserID() == current.assigned_to) {
answer = true;
}
If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:31 AM
Hi @Ramanjaneyuv ,
I tried your problem in my PDI and it works for me. You can create OnLoad client script and add below code
function onLoad() {
//Type appropriate comment here, and begin script below
alert('Inside Show Desc = ' + g_user.userID);
alert("assigned_to = " + g_form.getValue('assigned_to'))
if(g_form.getValue('assigned_to') != g_user.userID){
g_form.setReadOnly('short_description', true);
}
else{
g_form.setReadOnly('short_description', false);
}
}
Result
Assigned to Beth short description is read only
Assigned to me it is editable
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:33 AM