If I know a customlist's exact id (eg: "customlist...
# suitescript
b
If I know a customlist's exact id (eg: "customlist_sizes"), is there any way in SuiteScript to get the numeric
internalid
(eg: 413)? I've learned (thanks to @battk!!) how to load a customlist as a search (via
search.create({ type:'customlist_sizes'})
, but this only gives me the sublist of values and not anything related to the customlist's main line fields. Thanks1
t
@Beau If you want to use SuiteQL, you can query the CustomList table to get information about the list itself (owner, etc). You can then query the list itself to get its values. For example:
Copy code
SELECT
	ID,
	Name,
	ExternalID
FROM
	CUSTOMLIST404
WHERE
	IsInactive = 'F'
ORDER BY
	Name
Does that help?
b
the search answer is to do a
customlist
search
same thing for the query, do a query on the
customlist
table
b
I'm trying to get the numeric id of the customlist, not the numeric ids of the values within the customlist...does that make sense?
b
m
this is quick 1.0 but something like
Copy code
var list_search = nlapiSearchRecord('customlist', null, [new nlobjSearchFilter('scriptid',null,'is','my_cust_search')],null);
The id should come up on the result set
b
yep thanks @Mark Robinson that's exactly what I landed on in SS2, thank you so much, that
scriptid
and saved search was the secret to getting there
m
👍 glad I could help
b
and thanks again battk... and @tdietrich I couldn't figure it out in SuiteQL, maybe if there is a
customlist
table where i can see all custom lists? thank you though
oh interesting i just tried a
SELECT * FROM customlist
in SuiteQL and that gives me the list of ids and "scriptids" too...I learned a lot from this thanks for everyone's feedback!!