Hi everyone, is it possible to disable the -new- option, in the Ship To Select field on a Sales Order or prevent that a role can create a new address?
s
sterling_rose
03/23/2020, 6:14 PM
you might be able to do it via dom hacking… another solution would be to hide that native field and create a custom one with combination of user event and client scripts to update the list options
i
IvanP
03/23/2020, 11:57 PM
@sterling_rose I was afraid that the DOM hacking was the only answer. I had not thought second option. I will try it. Thanks a lot!
s
sterling_rose
03/24/2020, 1:16 AM
yeah i’ve used this method for other lists that i wanted to filter. The only issue with this case is its a little more delicate because you’ll want to initialize it on load in case the form already has a customer but then you’ll also need to fire it and reset the list if the user changes the customer selection. And then of course having the client script to set the native fields on change as well.