- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:38 AM
Dear Expert,
I need to specify a requirement for the Catalog Task. Whenever a technician tries to complete the task, it is mandatory for them to fill in the 'Assigned to' field.
So when the state is close complete make the Assigned to field set to Mandatory.
Please help.
Thank you,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:49 AM
Write a UI Policy on sc_task table.
Condition: State = Closed Complete
Then in UI policy action related list :
Click New Button
Add a record as 'Assigned to '> Mandatory to true
rest all like visible and read only leave as it is..
Then check again on same task.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:44 AM - edited 07-13-2023 06:51 AM
Hello @ND7
Greetings!
try Before Business Rule as below
Table : Catalog Task
Advanced : True
When to Run. When : Before
When to Run. Update : True
When to Run. Filter Condition : <State> <Changes To> <closed complete>
Advanced Script should be below:
(function executeRule(current, previous /*null when async*/ ) {
if (JSUtil.nil(current.assigned_to)) {
gs.addErrorMessage('Assigned To should be updated while closing the task');
current.setAbortAction(true);
}
})(current, previous);
Help others to find a correct solution by marking the appropriate response as correct answer and helpful!!
Kind Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:49 AM
Write a UI Policy on sc_task table.
Condition: State = Closed Complete
Then in UI policy action related list :
Click New Button
Add a record as 'Assigned to '> Mandatory to true
rest all like visible and read only leave as it is..
Then check again on same task.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 06:50 AM
Hi @ND7 ,
You could also do it via UI Policy
Condition: state is 'Closed complete'
Ui Policy action: Assigned to mandatory
Let me know if that helps!