How can I get access to packagetrackingnumber fiel...
# suitescript
a
How can I get access to packagetrackingnumber field under Packages subtab in Item Fulfillment records?
I know it's a custom field in a custom sublist but what is the general syntax to retrieve values like these with a simple nlapiGetFieldValue?
e
This is similar to Addresses, is a subrecord, look for articles to work with subrecords to understand this better. I do not have an example right now to share.
b
package sublist is a sublist
s
Did you already try
record.getSublistValue('package', 'packagetrackingnumber', 0)
, taht would be my guess based upon how the field explorer looks
b
you will probably have multiple choices for which functions to use depending on context, safe bet is probably nlapiGetLineItemValue
a
nlapiGetLineItemValue didn’t work to my surprise. Also I tried getSublistValue and it threw an error.
b
share the code
a
I need to source the value of package tracking into a custom field once IF record is created for global search
b
read the docs for nlapiGetLineItemValue closer, your linenum is invalid
you may also want to share what type of script you are working with, execute is a suitescript 2 entry point which is unlikely to be what you have
a
I need to source package tracking value into a custom field once IF record is created for global search.
b
script type would be one of SuiteScript 1.0 Script Types