- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 04:05 AM
I have created one onload client script for read only of impact and urgency fields based on role condition but it is not working in reload page like when that role assign the user then it is not working after user again log in then it is working
If anyone known that troubleshoot please let me known
Onload client script :
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_user.hasRoleExactly('priority manager')){
setTimeout(function() {g_form.setReadonly('urgency', false ); }, 0); setTimeout(function() {g_form.setReadonly('impact', false ); }, 0); }
}else{ setTimeout(function() {g_form.setReadonly('urgency', true); }, 0); setTimeout(function() {g_form.setReadonly('impact', true); }, 0); }
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 06:40 AM
Hi,
That may be tricky since add/remove role will perhaps not be a related activity. Easiest is perhaps to combine it with a info message "If you recently were assigned the role, please logout and try again".
Regards,
Niklas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 04:23 AM
Hi,
This is expected behaviour. Assigning a role to a user requires a new session before the user has that role.
"If the user is logged in when you update their roles, the user may need to log out and back in again if they are unable to access records allowed by the new role."
Regards
Niklas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 04:33 AM
Okay how to configured in reload page if any another methods is there for that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 06:40 AM
Hi,
That may be tricky since add/remove role will perhaps not be a related activity. Easiest is perhaps to combine it with a info message "If you recently were assigned the role, please logout and try again".
Regards,
Niklas