has anybody ever had issues with creating a saved ...
# suitescript
t
has anybody ever had issues with creating a saved search dropdown on a suitelet? I add the field with w source of record.Type.SAVED_SEARCH but always get an empty dropdown?
b
public searches only
t
yeah the searches I'm looking to appear in the list are public. I have just double checked
b
get the internal id of the saved search source option
most straightforward is to create a custom field with saved search as the list/record source
then use nlapiGetFieldValue to get its internal id
t
ok I will give it a go thanks battk
found the answer
Copy code
This search type is not supported by SuiteScript.
b
im assuming you got that for something else
the internal id of saved searches works fine
message has been deleted
t
I shouldn't trust the export plugin then
b
it throws that for searches which you must specify the search type
to load the search
specifically any of the standalone search types listed in search.load(options)
keep in mind that the internal id you are looking for is a negative internal id number
t
right i understand thanks! its -1! 🙂 I will give it a go
b
your account is weird if its -1
t
yeah your right i miss read the URL its -119
Got it working thanks @battk
m
@dcrsmith can you update the error message for unsupported types to add a disclaimer that it might be a "standalone" search type?
or if you want to add in support it looks like you can get the search type via hidden DOM field
document.getElementById("searchtype").value