How do i get id´s for these sublists???? I cant ri...
# suitescript
c
How do i get id´s for these sublists???? I cant right click them and use field explorer quite annoying
s
the most likely answer is those are probably not sublists.
c
Soo how do i get the value ?
Writing a script and i need this value
message has been deleted
could this be it?
s
those may be tabs that represent searches.
b
its usually easier to just load the record in the console to inspect its json
c
@battk how do you do that ?
b
use require in the browser console to get access to the record module
load your record
c
message has been deleted
@battk
Does not work
b
then log the output of yourRecord.toJSON() in the console
Use N/record
c
message has been deleted
b
the first parameter to require are your dependencies
the second paramter is a function that uses those dependencies
c
this?=
message has been deleted
b
load a record in the callback function and log it in the console
c
i dont get it
require(["N/Record",] callback)
??
b
callback is supposed to be a function
whose parameters match your dependencies
just like the define function
c
this is so confusing
can you make an example?
like how you would write it
require(["N/Record",] function LocalRequire())
b
you use it the same as you would a define function
c
message has been deleted
tried to do this
message has been deleted
this is my record
b
creating a record wont really get you to loading and logging it
c
message has been deleted
load does not work either
like it gives me errors no matter what i type
b
click the arrow to the left of the text
SuiteScript Error
to see more about the error object
i use Error in a loose sense of the term, the errors created by SuiteScript arent actually Error objects
c
message has been deleted
b
the one to the immediate left of the SuiteScriptError
not the one to the left of
Uncaught
c
Just gives me a long list
of nothing
message has been deleted
b
should have a message in there
c
load: Missing a required argument: type
b
which tells you what your error is
c
yea missing argument
but i dont know what its missing
i have followed this guide, but why does it not work its so confusing
im doing exatcly what it says
first i type require(["N/currentRecord"]);
but that already gives me an error
b
what is the value of the type you pass into record.load?
c
the value of the type???
its a record
which is an inventory item
b
i only have screenshots of your code, im only going to describe it
at no point in your code is the word inventory item present
c
message has been deleted
it says the internal id is "itemtype"
b
thats not how the record type enumeration works
c
Sry i did now know, im still very new to netsuite
hmm
so
i have no idea what to type then
b
c
or where to find the correct enum
message has been deleted
so i need the specific id the the given record?
message has been deleted
it worked
Thank you so much for your patience
means a lot
message has been deleted
new problem tho.. still trying to get the value in the vendor tab
but nothing is there
message has been deleted
message has been deleted
see it should hold 10k
b
you can log the subrecord the same way you log a record after you get it
c
link does not work
message has been deleted
i can find locations
and the values for that
message has been deleted
but vendors nope, not showing up
wait
maybe its because i am loading the non sandbox record?
Because the recod in the live enviorment does not have a vendor purchase price
b
wrong link before
c
do you think i am loading the record from the live netsuite
and not the sandbox record?
message has been deleted
I know its called purchaseprice
and the id is that im pretty sure
but i have tried to search for it in my code but i get an error
is it because i cant search for a sublist value in this search where i search for the main line values?
b
subrecords are represented differently
c
alright
b
its another record that you have to get
c
hmm