Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Only new state visible when creating new incidents

Christian22A
Tera Contributor

What is the best approach to limit all users other than admins to only be able to save/submit new incidents in a new state?  The options to change the state to in progress, on hold, resolved or cancelled should not be visible until after the creation of an incident.

1 ACCEPTED SOLUTION

something like this in an onload client script

 

if(!g_user.hasRole('admin') && g_form.isnNewRecord())
{
// set value of state or make it read only
g_form.setValue('state', 1);
g_form.setReadOnly('state', true);
}

 

 

View solution in original post

5 REPLIES 5

Anurag Tripathi
Giga Patron

HI,

You can just hide the state , when user is not admin && incident is new, you can do so via client script.

Will that work for you?

 

something like this in an onload client script

 

if(!g_user.hasRole('admin') && g_form.isnNewRecord())
{
// set value of state or make it read only
g_form.setValue('state', 1);
g_form.setReadOnly('state', true);
}

 

 

Killing it...  Experience.... 

Dr Atul - LNG
Tera Patron

Hi @Christian22A 

 

I am not 100% agree, as this is required to modify the basic functionality of system. If you want to do , you can use BR to hide the rest of state.