- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 08:47 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 12:14 PM
gs.addInfoMessage('Your message');
current.state=previous.state;
current.setAbortAction(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 11:56 AM
or
gs.addErrorMessage("your message here");
current.setAbortAction(true);
gs.setRedirect(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 09:04 AM
Try data policy option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 10:05 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 12:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 11:07 PM