Disclaimer: This is not best practice, it is a workaround, designed for a very specific situation that may not fit your problem. Neither I nor my employer are responsible for any damages resulting from downloading or using the original or modified contents of this script file. By downloading or using the contents of this script file, you assume all responsibility for whatever happens when it executes. Make sure you understand the contents of the file and how it works and how it will affect your system and your procedures before using it. It also relies on the clientside DOM, which means it will stop working if and when NetSuite changes the DOM for View mode on transaction pages, especially the Item sublist. It also won't work if the Create PO column is re-labeled on the current Form, because it's looking for the correct column to modify based on its tooltip, which is based on the field label (but you can modify the script to look for all the labels that Create PO could have).
If your transaction lines should have Drop Ship/Spec Ord links in View mode, but they don't, you can force a Drop Ship link to show up by creating a User Event script with the code in the file below (remove the .txt part of the extension first)
You will want to modify the contents of the script file to suit your situation.
This script file is tailored to a very specific scenario:
- INTERCOMPANY CROSS-SUBSIDIARY FULFILLMENT feature is enabled.
- The Sales Orders that were not getting Drop Ship links on their item lines were created by SuiteCommerce checkout placing the order.
This combination of factors, for some reason, caused the Drop Ship links not to appear, even on new items added to the Sales Order afterward. It also makes an alternative to this script work around the problem too: Automatically set the Inventory Location on each line you need a Drop Ship/Spec Ord link to appear. This approach didn't make sense to us because the point of drop shipping is to skip over having things in your inventory in the first place (but it does work!).
In this particular situation, creating the exact same Sales Order any other way than via web store checkout allows the Drop Ship/Spec Ord links to appear.
For this reason, the script file specifically ignores Sales Orders that were not created from the Web Store, since we were only working around that specific problem. You can remove that from the code for your situation if needed.
The script also currently adds Drop Ship links to any line where the Create PO column is empty in the browser. You might want to discriminate further than that.
In creating the Drop Ship link, it assumes that both the "entity" and "poentity" URL parameters would be set to the same vendor, which it gets from the Item line's PO Vendor column. I have no idea if this is the correct way to go about it, even for our particular niche situation, but I believe those two parameters are what would make one line's Drop Ship link different from another's.