Quick question: How can I know which inbound shipm...
# suitescript
m
Quick question: How can I know which inbound shipment originated a particular Item Receipt?
b
for these kind of questions, you need to understand that there are basically 3 different data models
there is the record model, which you get using N/record
m
okay okay
b
you check if what you are looking for is available by loading your record and seeing if any of the fields has the data
in your case, that would mean loading the inbound shipment and item receipt and seeing if any of their fields match the others internal id
i personally like loading the record in the browser console and logging the record
m
@battk yeah I tried to find that link but I noticed the receipt does link back to the P.O. it was created from
Been all day trying to find that link so I can retrieve some info from the inbound shipment record that created the receipt
b
that sounds pretty weird
to my knowledge, a item receipt is always created from something
m
yes, it does have a field that holds that info
but it references the PO it was created from, even if it was created via the Inbound Shipment transaction
it always links back to the PO
b
did you mixup purchase order and item receipt somewhere?
the item receipt should have a
createdfrom
that points to its purchase order
m
Not to my knowledge no, this is the scenario. 1 I created a PO with 3 items, 2nd I created an inbound shipment, added all items in that PO and clicked on receive.
b
and an
inboundshipment
field for its item receipt
👍🏼 1
🙏🏼 1
🎉 1
m
huh.. i do know about the createdfrom
but not the other one.. was it really there the whole time and I missed it?
!@#$%^
@battk, You are correct Sir. Thank you so much!
I didn't know that field existed, I spent more than 10 hours running in circles
b
should have been able to see it from the item receipt
m
yeah, Where did you get that info? is it on the records browser?
b
mostly just looking at an item receipt
i basically never use the record browser
m
but but , is it a hidden field?
Or is it shown by default and I have been looking at a custom form all along?
b
use the standard form
you should have also been able to see it by logging the record in suitescript
m
This is how it looks when I open a Receipt on the GUI
I do see the
inboundshipment
field using the Netsuite field explorer extension in Chrome
b
im guessing you have a custom form
edit the record and change the form
or alternatively edit the record and use the cf url parameter to choose your form
m
Thank you for your help, I'm new to SuitScript, I wanna buy you a coffee or something lol
b
you should have also been able to do this from a search on the inbound shipment
m
basically a search to find all receipts from that inbound shipment... interesting
b
you can probably do the same thing from a dataset query
those are basically your 3 choices for getting data from netsuite
your approach should have been to try 1 of them to see if it has your data
if it doesn't, move to the next
although in this case, im pretty sure any of the 3 would have gotten the data, though maybe not in the direction you were expecting
im not sure if a search starting in an item receipt can get to the inbound shipment
m
@battk You've been a lifesaver, thank you for your help and time