- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 07:27 AM
I have a scenario where only a change manager should be able to cancel the change at the assess state.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 07:46 AM
@Sairam3697 Here is how you can handle it via business rule
Here is the script.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
if (!gs.hasRole('change_manager')) {
current.setAbortAction(true);
gs.addErrorMessage('Only user with change manager role can cancel the change in assess state');
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 07:37 AM
Hi @Sairam3697,
you can use onload client script if user has "change_manager" role, at accordingly set the state field to read only.
You can use this logic provided below.
if (!g_user.hasRole('change_manager')) {
g_form.setReadOnly('state', true); // Replace state with backend value of state field.
}
Thank you, please make helpful if you accept the solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 07:46 AM
@Sairam3697 Here is how you can handle it via business rule
Here is the script.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
if (!gs.hasRole('change_manager')) {
current.setAbortAction(true);
gs.addErrorMessage('Only user with change manager role can cancel the change in assess state');
}
})(current, previous);