Need to write the client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 04:05 AM
If assigned to filled, state should be changed to Open.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 04:08 AM
Could you please provide more detail, what exact is your use case, which table, from where the state should change?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 04:21 AM
It is on the case table, if state is new and filling the assigned to field. State set to open.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 04:23 AM
@PRAGHATIESH S You can take inputs from the following client script if you need to set state field based on assigned to field. An onChange client script on Assigned to field can be created as follows.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
// Check if the new value of Impact is different from the old value
if (newValue != oldValue) {
// Set the State field to "Open" (value of '1' is for Open state)
g_form.setValue('state', '1');
}
}
Hope this helps.