Does anyone have a trick for accessing a stock lis...
# suitescript
k
Does anyone have a trick for accessing a stock list with Suitescript? I'm specifically looking at the caseorigin list.
b
create a case in dynamic mode and use Field.getSelectOptions
k
I'm in a userevent beforeSubmit in this scenario. The case is being created by the SCA website.
So far the only thing I think would work is to switch to afterSubmit and do a search on the case to get the origin field.
b
what are you trying to get?
the value of a field, or the ids/names of the case origins?
k
I'm trying to get the origin name, getValue gives me the ID.
I can't seem to search or load the stock list to look up the id:name relationships.
b
load the record
its record id is
supportcaseorigin
k
how did you find that id?
and thanks!
b
netsuite makes a list of record ids available clientside to validate against
it uses the nsapiGetRecord function to access that list
and the function is simple enough to recreate to log that list
k
just hoping to understand how to look up stock list ids in the future
I do see SupportCaseOrigin in the schema browser, but I wouldn't normally comb through that.