Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Create a New Sales Order PHP Example
Hi,
Any one can share the sample PHP code to create a new sales order with multiple items for a customer, if customer does not exist, then create the customer first?
Is there a function that when I try to create a customer, it will check if this is a dup customer based on my system dup customer rule setup, only create when it is a new customer?
This code always create a new customer, does not care about dup.
//create Customer record
$customer = new nsComplexObject('Customer');
// set fields
$customer->setFields($customerFields);
// perform add operation and store nsWriteResponse object in $addResponse variable
0