Is there a way to filter out select fields in NetS...
# suitescript
f
Is there a way to filter out select fields in NetSuite? A customer needs to create a purchase order and should only be able to select Milestones that belongs to the same contract id, but NetSuite let’s them choose all existing Milestones which is problematic as they’re all named the same.
n
is "Milestones" a custom field? Is there a direct route on the record you see Milestones to the "contract id" you want to filter on? If so, you may be able to configure the Milestones field.
f
It’s a standard field, project task
n
No then, not without scripting, something like: 1. On edit hide the native field 2. Add a custom field, apply logic to set up the select values. 3. Capture the selected value from the custom field and set the native field
t
supplementing to @NElliott, you can also do a serverWidget field using a UE before load form.addField as select without source then combo with an additional clientscript field.insertSelectOption and field.removeSelectOption for more control in what is displayed i guess thats the step 2.b (optional) if direct field control isnt sufficient!
👍🏻 1
f
Yeah, this was one of the ideas I had as well. I will do this too, however as a first step I created a button that just generates the next line as it’s possible to know beforehand
Thanks guys!