Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Sales Order Item Options
Hello,
I'm creating a sales order with an item and a client attached to it using Java.
I would like to set the Options field where i have 3 custom fields, but i can't access these fields, i'm getting an error : "The specified custom field reference custcoldomain1 is invalid."
Here is my code :
...
//Get the the item
item = new RecordRef();
item.setType(RecordType.inventoryItem);
item.setInternalId(PRODUCT);
salesItem = new SalesOrderItem();
salesItem.setItem(item);
//Set quantity and price
salesItem.setQuantity(QUANTITY);
salesItem.setAmount(PRICE);
//Set the Options
StringCustomFieldRef custcoldomain1 = new StringCustomFieldRef();
custcoldomain1.setInternalId("custcoldomain1");
custcoldomain1.setValue("www.somevalue.com");
BooleanCustomFieldRef custcoldomaintemp1 = new BooleanCustomFieldRef(true,"custcoldomaintemp1");