Quick question. Creating a Sales Order from SuiteS...
# suitescript
d
Quick question. Creating a Sales Order from SuiteScript and I'm getting a DUP_RCRD error. I'm not setting an externalid and the tranid is set to autogenerate. Does anyone know what the cause might be?
j
Can you post your code?
p
That error usually means something in the record is creating a duplicate reference even if externalid and tranid are not set. Please check if the script or another process is trying to create the same order twice or if there is a unique field like a custom external id being reused.
d
The script works for some Customers, but not others. It only creates a basic sales order with a single item (for later processing).
p
If it only fails for certain customers, there might be a duplicate transaction already tied to that customer. Try checking if a pending or identical Sales Order exists for them, since NetSuite can block new ones with matching references or identical data.