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

Thanks upendra, It your answer has shown some guidance where I can modify it and make it work for me.

 

Thank you