I have sales orders with multiple line items. So ...
# suitescript
s
I have sales orders with multiple line items. So the orders can have multiple fulfillment records. Even multiple fulfillment records for the same line item when the item has qty>1 and it is a large item that ships separately. How do I link a saved search to get the packages/tracking numbers for individual line items? If a saved search cannot do it, how can I do so within script? Does anyone have sample code for that? Thanks.
a
Is the task: "Give me all sales orders with the tracking numbers that are listed on the item fulfillment line numbers?"
s
Not really... It is give me the sales order lines with their specific package details (tracking#, etc), for each. including if there are more than one package for a line. We need to send ASNs to customers that want the tracking numbers of all items on the sales order.
r
would SuiteQL be ok?
actually it seams fairly strait forward with analytics
message has been deleted
message has been deleted
start with new dataset on transaction
filter to sales order type, add item display name or what ever, add Related Transaction Lines, filter that to type IF. From the Related Trans Lines add Tracking Numbers->Tracking Number
once you have a data set you can access via suitescript
the problem with saved searches is the multilayer joins typically
s
thanks @redfishdev but when I do the above, I get too many lines. I have a SO with two lines, qty of 2 on each line. each item ships separate so I get one fulfillment with 4 tracking numbers, one for each of the items. but the are replicated. On the dataset, it shows the same 4 lines twice, once for each of the two line items. ..
b
nothing looks duplicated here, netsuite doesnt associated tracking numbers with individual items
so you get each line associated with all tracking numbers
in this case, 2 item lines, each associated with all 4 tracking numbers, for a total of 8 rows
s
Netsuite does at least know the tracking numbers by the line items...
b
that description performs no technical function
its a memo
those tracking numbers are associated with the transaction, not the lines of the transaction
s
...and yet they at least have the item description of the line. two tracking numbers for each of the two lines that have quantity of two. and they have the correct ship weight for each item. So they are coming very close to being linked to a line, a shame that those records do not have the SO line number on them.