Hi everyone, I'm trying to filter a list of Addres...
# suitescript
s
Hi everyone, I'm trying to filter a list of Addresses, in a transaction line field in the item Sublist of the Sales Order, the filter by the vendor selected in the line. You can't do this through workflow or UI, so I'm trying to use a Client Script on Field sourced or changed, but don't think it's possible to filter a custom field Addressbook type.
m
Im not sure this answers your question but the custom address id in the drop-down is always "-1", try getting it like that
s
Actually I'm looking to filter the addressbook list to give me only the selected VENDOR addresses.
d
^^ cont. I have a body field on the contact record for address, which is hidden from the UI. I then have a UE script that adds a custom/temporary body field (on beforeLoad) to the contact and populates it with addresses from the contact's linked customer (using a search to find the addresses) (The select options are are added using their internal id as
value
and their label as
text
) Then, on beforeSubmit, the address selection is translated back to the hidden address field
Message me for examples and (admittedly amateur) help