how to add two different suffix for two different PO numbers via scripting ?
Dear All, I want to generate two different PO number, by adding suffix before it, I have local vendor and foreign vendor if I choose local vendor the PO will be like “LPO-123” when chose foreign vendor the PO will be like “FPO-123”, I want to make this via scripting.
Hi,
Does it matter if there are gaps in each sequence?
I’m thinking that you could let NetSuite generate the number using the default auto-numbering and then update it after that?
Thanks,
Chris
yes it is matter, my customer have two types of vendor (local vendor and foreign vendor) and each vendor has his own PO to can be differentiate between them
Consider using subsidiary specific or location specific auto numbering prefixes.
The suitescript solution to this is to use a user event script after submit entry point to lookup your purchase order’s tranid, then submit the new value. You should basically expect this to double your purchase order’s save time. If that is unacceptably long, then you can differ processing to later using a map/reduce script to do the logic.
Keep in mind that your auto numbering setup must allow overrides to overwrite the tranid.