- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 01:59 AM
Hi All,
I have a requirement to set the requested Item state based on some conditions.
In requested item table I have created one custom field= u_status
on change of u_status i have written a client script;
var req_status = g_form.getValue('u_status');
if (req_status == "Done" ) {
g_form.setValue('state',3);
}
Value is setting but after reload it again went back to Open state.
Please help me here.
Thanks,
Sam
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 02:02 AM
Hi @Samiksha2 The value is setting but did you save the form before you reload the form?
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 02:02 AM
Hi @Samiksha2 The value is setting but did you save the form before you reload the form?
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 02:05 AM - edited 02-28-2024 02:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 05:21 PM
Hi @Samiksha2 If my answer was helpful and your issue is resolved, please close the thread by accepting solution.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 02:07 AM
Hi try this
var req_status = g_form.getValue('u_status');
if (req_status == "Done" && g_form.getValue('state') != 3)
{ g_form.setValue('state', 3);
}