how can remove few values in a list when used in ...
# suitescript
s
how can remove few values in a list when used in custom field in any record.? Suppose there are 3 values present in custom list definetion which is sourced in custom field in any record, and there is a scenario i just want to show only 2 values from the list to select in that record.
n
add filtering to the field based on the criteria you want to restrict the list by perhaps? That would be the simplest way if there's nothing complex about what you wish to filter on. Otherwise you're looking at hiding the proper field and adding a customer one dynamically and putting in place a script to populate the "real" field since you cannot add / remove form a list that's defined via the UI. You'd probably have more flexibility if your field was populated with a record rather than a list. You may want to consider that, it really depends on your use case.
s
suppose i have created list of custom record with values and sourced the same in a custom field
and i want to restrict list of custom record value in the custom field. how can i do that by script.
n
I don't believe you can directly I would look to filter the content on the field if possible.
I'm talking about something like this
s
@shadman Ashrafi Neil is right, you would have to utilize SuiteBuilder features for this. Another option however is to modify the DOM to remove the unwanted elements from the fields using a client script. This is not recommended by NetSuite though.