I added a custom field to the Address Form. I'd li...
# suitescript
r
I added a custom field to the Address Form. I'd like to extract this custom field from both Setup->Company->Location level as well as customer records via Sales Orders or Fulfillment transactions. I'm progressing, but not sure if I should be using record or search to get the location information.
b
context matters
do whatever is most convenient to you in a map/reduce script
choose the fastest for a user event script (which usually means a search or query)
r
I've got access all the way form the Client script, User event script and suitelet to extract it.
b
performance is usually irrelevant for client script, the https request will take longer than getting the data
usually that means minimizing the number of https requests you make
if you want a general answer, dont load a record if you dont plan on saving it
r
Is a record also the base of an Address Form? i.e. I need to get the Location or Customer record and navigate to the address form field I need?
b
im not sure what you are asking
forms are more layouts, and have a lot more meaning in the ui than they do in a script
your records have address subrecords, which is how you would access the address related fields
similarly, searches have joins to access the address
same thing with queries, they have access to joins too