How to make field mandatory on incident form

kumaraj
Kilo Sage

Hi All,

I have a requirement mentioned below, could someone help me to achieve it.

Right now Category field and subcategory fields are not mandatory.

when we make category/subcategory fields mandatory by Client script/UI Policy even then  the user is able to resolve incident bypassing mandatory fields. Now I was told that remove the mandatory tag from both the fields and create a BR which can perform below:

Requirement: If someone tries to update state field then 

if(current.state.changesTo('Resolved/In progress/On hold') && current.category || current.subcategory =='')

then system should abort the action with a message that please category and subcategory filed.

This BR should also prevent updating state when user trying to update by sending email or via service portal. (This is main requirement)  

Thank you

1 ACCEPTED SOLUTION

Upender Kumar
Mega Sage

find_real_file.png

 

	gs.addInfoMessage('Your message');
	current.state=previous.state;
	current.setAbortAction(true);

View solution in original post

15 REPLIES 15

or

gs.addErrorMessage("your message here");
current.setAbortAction(true);
gs.setRedirect(current);

Onkar Pandav
Tera Guru

Try data policy option.

Hi Onnkar, Thank you for you time.

I first of all used Data policy, however It will restrict import set as well or data comin from any other means, so I was told not to use data policy.

Thank you

Upender Kumar
Mega Sage

find_real_file.png

 

	gs.addInfoMessage('Your message');
	current.state=previous.state;
	current.setAbortAction(true);

Hi Upendra,

I have implemented this as well but getting same issue, i need to reload it to get it previous state.

And how to get rid of the below circled message? any clue.

find_real_file.png