I need the Line Number on a Sales Order to be adde...
# suitescript
t
I need the Line Number on a Sales Order to be added to the Line Item on a Purchase Order, for an EDI integration. Is there a way to do it without script? I’ve hit a few dead ends and it’s looking like it’s going to take a custcol that’s set in a user script before submit which I was hoping to avoid.
k
@Timothy How are you bringing in the EDI transaction? Is it through your own application or is it through a 3rd party provider like SPSComnerce or B2BGateway etc? Also Assume you are bringing in EDI 850 Purchase order (from a customer) and creating a Sales order in Netsuite?
t
Truecommerce integration and it’s a PO going out to a drop ship vendor and an ASN coming back in. They need the line number from the sales order for bringing the ASN in and creating the Item Fulfillment but the its not available on the PO we send out
t
They are but they are unavailable for sourcing until after the record is saved and the line numbers on the sales order do not necessarily line up with the numbers on the PO. I figured out how to do what I needed but it’s another ass backwards approach. I created 2 custom columns. One to act as a unique line key on both the sales order and po. It’s hidden but accessible via script. Before the SO is saved I add a unique key to each line. The PO is auto generated by NetSuite in the after submit event and the key is carried over with the line information on the PO. The PO is not scriptable in the before submit event so I have to reload it in the after submit event. I then pass the SO ID to a search that gives me back an object with the keys being the unique line key and the values being the SO line number. I then crawl the PO lines and set the second custom field with the line number by mapping the first field to the objects keys. Just another day in NetSuite:-)