It is easy to remove an option from an option set.
var control = Xrm.Page.ui.controls.get("casetypecode");
control.removeOption(1);
But, when you try to remove a subject from a subject field, it does not work.
This is the type:
This is how it looks when expanded:
I just don't think that removeOption
is going to work the subject field, it isn't an option set field - based on your image it is listed as a lookup.
Given that subject is a special field, I'm not sure which options are open to you. If it behaves like a normal lookup you might be able to use the lookup functions to filter the view.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.