Make field mandatory and non mandatory

Praveen75
Tera Contributor

Hi Guys, I have an ask when a user closes SCTASK manually the "Assigned to" field should become mandatory. But when SCTASK is auto closed by system or flow then "Assigned to" field can be empty and non mandatory. I tried using UI policy but it makes the "Assigned to" field mandatory based on the condition. Please help. Thanks.

2 REPLIES 2

Rohit  Singh
Mega Sage

Hi @Praveen75 ,

 

When a record is updated through script or flow then mandatory is bypassed. 
You can try and check by updating an incident record from background script without updating any mandatory field. This is a usual behaviour of the system.

 

If my response helped, then please accept the solution and hit thumbs up so that it benefits future readers as well.

 

Regards,

Rohit

Ankur Bawiskar
Tera Patron
Tera Patron

@Praveen75 

This is more of business requirement and discussions with your customer.

You can use Data policy and make Assigned to Mandatory and it will work when your task is closed by flow or any script.

why is assigned to empty when someone is actually working?

Also are you not assigning the task to someone?

Why are you closing tasks which are unassigned?

You can close tasks which are assigned (assigned to is not empty) but not updated over few days.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader