- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 07:08 PM
i have a "Request_Status" field in Request Table(sc_request) with a choice list of 5 values. I have another field on the form "state" field. If "Request_Status" field has a value "approved or completed" then user shouldn't be able to select "closed skipped" under "state" field.
client script doesn't seem to work
var request_state = g_form.getvalue('request_state');
if (request_state=='approved') {
g_form.removeOption('state','15');
disableoption('state','15');
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 03:19 AM
Hi,
disableoption is not a function.You have to define your own in UI Script to hide option and if you have removed the option then there is no option to disable. And write your code onChange of first filed.
var request_state = g_form.getvalue('request_state');
if (request_state=='approved') {
g_form.removeOption('state','15');
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 07:42 PM
Hi ,
I have tried this scenario, it is working for me.you have to select UI type is All in onchange method

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:01 PM
Hi,
I have tried this scenario using onchange client script .it is working for me. you have to write onchange client script on request state and write remove option method to remove state field value.
Thank you
Gajanan Biradar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 03:19 AM
Hi,
disableoption is not a function.You have to define your own in UI Script to hide option and if you have removed the option then there is no option to disable. And write your code onChange of first filed.
var request_state = g_form.getvalue('request_state');
if (request_state=='approved') {
g_form.removeOption('state','15');
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 03:41 AM