Handling Sales Order Duplication Script in NetSuite
One of our China-based clients is a leading online retailer of the premium baby, parenting, and family products to retailers and consumers across China, Southeast Asia, Australia, and New Zealand.
Their 100+ team of branding, marketing, sales, logistics, and digital specialists-spanning seven regional offices, warehouses, local languages, time zones, and cultures-provides turnkey market access for brand owners, complete category fulfilment for retailers, and fresh, exciting product collections for their consumers.
Our client required us to remove the duplicate document number. There will be a document number in the sales order record. Repetition is not allowed in the Sales order document number.
If two people create sales orders at the same time, it displays the same document number.
To meet their requirements, a prefix is added on the basis of subsidiary and currency. An entry is also created in the custom record at the same time a sales order is created. Custom records will be empty as soon as the sales order is created and updated, its entry will also be deleted.
Our client met the requirements successfully, removing duplication from the sales order document number. Without repeating internal ID in the custom record there would not be any duplication when document number is updated in sales order.