How to remove option from reference field in client script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 01:24 AM - edited ‎02-22-2024 01:25 AM
HI Team,
I have a requirement wherein I have to remove an option from a reference field if another field on form which is 'table' and if its value is 'case' or 'order'.
Can someone tell the syntax where to write other than writing script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 01:41 AM
Hi,
Straight approach for this would be to use reference qualifier but it is a complicated query so most likely you will need a script include. If you don't want to use script include , I think, the only option left is to let the user select what they want and then validate it on the client script and if they should not select that option then you throw an error.
I would suggest you write an script and post here if it doesnt work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 01:49 AM
Hi @Community Alums ,
I don't think that is possible via client script only as Reference field values come from a table so based upon certain value we cannot remove\hide the values. We need to have one hidden field created where based upon certain value selection we can populate that field with the reference qualifier query n in the reference field we can just use
current.variable.hidden_field;
Thanks,
Danish